Coordinates are limited?
Backtothis
Member, PRO Posts: 75
Say I have a scene size of 568x320. If I tell it to spawn an actor at (0,1000), it works. But, if I want it to spawn at (0,2000), it doesn't spawn unless I increase the scene size. Is there a way around this?
Comments
No, not without increasing the scene size. Actors that are positioned a certain distance beyond the edge of a scene are automatically destroyed.
I'm curious why you're spawning so far outside of the scene size. Could you create the same effect by putting a delay in the actor's rules so that it spawns right outside of the scene edge but waits to move into view?
And is there a reason you don't want to increase the scene size?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I'm playing around with a sliding scene of sorts, kind of like in Don't Step the White Tile, where the scene slides down and a new actor is spawned when you hit a target. Originally I had a variable for moving the actors that is set to true when you hit a target, but it turns out you can actually hit successive actors fast enough for GS to not have had time to evaluate all the rules, and then on rare occasions weird things can happen.
So I was trying to make something "stateless" rather than the "stateful" design involving a trigger attribute. So basically use a variable named offSet, which starts out at 0. Then every time you spawn an actor, you increase offset. The actors have their Y coordinates constrained to their initial Y minus offset, so that moves everything.
Increasing the scene size works if actors are moving top down, but if you change it to bottom up, then I have to reposition everything, and uh... well that will be quite involved lol.