Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Make off screen sprites detect if they're touching something
- StupidStars
-
Scratcher
1 post
Make off screen sprites detect if they're touching something
Hello!
I am making a version of Pac-Man heavily based off of TerminalMontage's “Something About Pac-Man” Video.
Link to his video here
https://m.youtube.com/watch?v=RR2dlAnP0-I&pp=ygUXc29tZXRoaW5nIGFib3V0IHBhYyBtYW4%3D
I am confused on how to make the ghosts detect if they're touching a wall whilst off screen. I was considering making the ghost pause their position when off screen, but that would be BORING and stuff.
How can I do this correctly?
I am making a version of Pac-Man heavily based off of TerminalMontage's “Something About Pac-Man” Video.
Link to his video here
https://m.youtube.com/watch?v=RR2dlAnP0-I&pp=ygUXc29tZXRoaW5nIGFib3V0IHBhYyBtYW4%3D
I am confused on how to make the ghosts detect if they're touching a wall whilst off screen. I was considering making the ghost pause their position when off screen, but that would be BORING and stuff.
How can I do this correctly?
- pika_boo
-
Scratcher
100+ posts
Make off screen sprites detect if they're touching something
you either have to:
- use lists instead of “if touching blocks” and manually calculate where the ghosts can move, by storing the ghost and the wall's location
- or make an invisible minimap of the world (ghost effect) so that the whole map is currently in the screen. then project a copy of the player's location to be visible
if you need clarification please let me know
- use lists instead of “if touching blocks” and manually calculate where the ghosts can move, by storing the ghost and the wall's location
- or make an invisible minimap of the world (ghost effect) so that the whole map is currently in the screen. then project a copy of the player's location to be visible
if you need clarification please let me know
- dem_bot
-
Scratcher
100+ posts
Make off screen sprites detect if they're touching something
Having them travel along a graph would be easiest I think
- Discussion Forums
- » Help with Scripts
-
» Make off screen sprites detect if they're touching something