Hi guys, I just wanted to know if there was a way to make a single actor wrap on the scene without checking the box in scene attributes? Thanks!
Comments
tenrdrmerMember, Sous Chef, Senior Sous-ChefPosts: 9,934
When self position x > scene.size.width --Change self.position.x to 0 Otherwise --When self.position.x < 0 ----Change self.position.x to scene.size.width
That should work for one actor obviously if you know the scene size you can just place a number instead of unlocking the actor to get to the scene attribute.
Another 'Rightwall about 480 pixels to the right of the first 'RightWall'
The space between the two 'RightWalls' is where you can put your enemies.
Make some move left - when they hit the left wall make them appear just before the first 'Rightwall' (and they'll continue moving left ad infinitum)
Make some move right - when they hit a 'RightWall' (either one) make them appear just before the LeftWall.
When the game starts the right moving baddies will hit the second 'RightWall' (the one on the far, far right) and appear just in front of the LeftWall - they'll then hit the first RightWall and loop back to the LeftWall.
It sounds worse than it is, but seems to work great so far for me!
Comments
--Change self.position.x to 0
Otherwise
--When self.position.x < 0
----Change self.position.x to scene.size.width
That should work for one actor obviously if you know the scene size you can just place a number instead of unlocking the actor to get to the scene attribute.
___________________________________________________________________________________
TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
Make two walls. Call them LeftWall, and RightWall
Then in your scene place:
One 'LeftWall' - just off the screen to the left
One 'Rightwall' just off the screen to the right
Another 'Rightwall about 480 pixels to the right of the first 'RightWall'
The space between the two 'RightWalls' is where you can put your enemies.
Make some move left - when they hit the left wall make them appear just before the first 'Rightwall' (and they'll continue moving left ad infinitum)
Make some move right - when they hit a 'RightWall' (either one) make them appear just before the LeftWall.
When the game starts the right moving baddies will hit the second 'RightWall' (the one on the far, far right) and appear just in front of the LeftWall - they'll then hit the first RightWall and loop back to the LeftWall.
It sounds worse than it is, but seems to work great so far for me!
Hope that helps!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io