Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » ANNOYING BUG
- yahia_ayman
- Scratcher
4 posts
ANNOYING BUG
I am working on a platformer game now. I've made locked doors that open when you collect a key in the game. I've added a simple
Please help! Thanks
go to x: (219) y: (78)but it keeps going to
go to x: (0) y: (78)I've searched my whole project for out-of-place blocks or blocks I forgot but there isn't anything wrong. What should I do? By the way I'm following @griffpatch tutorial.
Please help! Thanks
- --CHA0S--
- Scratcher
100+ posts
ANNOYING BUG
Could you share the link so I can search the code?
Hi
Trying to become a forum helper
- speedboostboy
- Scratcher
13 posts
ANNOYING BUG
The reason that happens is because the screen isn't that wide. The X position can only really go from -180 to 180, 190 if you have certain sprites
- ideapad-320
- Scratcher
1000+ posts
ANNOYING BUG
That's incorrect. Part of the sprite must be between x -240 and +240 and y -180 and +180. If you try to go off the side, it will just snap to the side, it wont just ignore the block. The reason that happens is because the screen isn't that wide. The X position can only really go from -180 to 180, 190 if you have certain sprites
Last edited by ideapad-320 (April 8, 2024 20:13:58)
This is my siggy.
Can't wait for FRC water game!
- yahia_ayman
- Scratcher
4 posts
ANNOYING BUG
Could you share the link so I can search the code?
Thanks, this is the link: https://scratch.mit.edu/projects/1004812899/
P.S.
It's clear that you like chaos ;D
- RokCoder
- Scratcher
1000+ posts
ANNOYING BUG
In your platform sprite you have an issue in your Tick platforms receiver -
But new x is a custom block variable that has no value in this receiver script (so defaults to zero)
(Incidentally, suggesting that we set SPAWN SCENE to 10 would have been useful for debugging this)
tick (new x::custom) (y position) :: custom
But new x is a custom block variable that has no value in this receiver script (so defaults to zero)
(Incidentally, suggesting that we set SPAWN SCENE to 10 would have been useful for debugging this)
Last edited by RokCoder (April 20, 2024 07:12:45)
- yahia_ayman
- Scratcher
4 posts
ANNOYING BUG
platform sprite you have an issue in your Tick platforms receiver -Thanks so much! In yourtick (new x::custom) (y position) :: custom
But new x is a custom block variable that has no value in this receiver script (so defaults to zero)
(Incidentally, suggesting that we set SPAWN SCENE to 10 would have been useful for debugging this)
I totally missed that while trying to debug!
- Discussion Forums
- » Help with Scripts
- » ANNOYING BUG