How do I spawn actors off screen? Newbie question :)
flurospeedo
Member Posts: 33
Hi, I would like to spawn instances of certain actors off screen (to the right of the screen) so that I may then move them onto the screen creating a scrolling effect. However when I try to input an x value that is greater than the screen size Gamesalad constrains the x value to the screen size. Is there a way around this? As an example, when creating for iPad I have a long image (1024 px) that I need to place at x:1536 in order that it is totally off screen before moving on screen.
Comments
@flurospeedo , Hi, firstly, you can't create instances via the Spawn behaviour, only copies of Prototypes.
To make sure a certain actor is spawned off screen, make sure Position in the behaviour is set to Relative to scene; then put its x or y coordinates as being outside the screen, i.e for the right for example, its normal y coordinate but for x, at least the width of the screen plus half the width of the actor.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Whoops, well done for spotting; minus ten points from me for not reading your question properly! ;-) Re: outside limits.... for some reason, there's not quite enough for iPad off-screen on the longest coordinate; so say your iPad screen is landscape, then trying to place the x coordinate to 1536, the GSC engine destroys it as soon as it's spawned... crazy really, the limit is something like 1520....of course, 1536 would only be needed for a 1024 width actor in this instance, but this rules out parallax scrolling unfortunately....
I'm not sure I've really helped after all....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps