How do I spawn actors off screen? Newbie question :)

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

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2012

    @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

  • flurospeedoflurospeedo Member Posts: 33
    Excellent @gyroscope, I will give that a try, thank you. From what you are saying I take it Gamesalad will permit an offscreen position of no more than half the width (or height) of the actor in question? That makes some of the stuff I am trying to do a little tricky as I was hoping to be able to position actors at certain points offscreen and then move them all at the same speed and the same distance onto the screen so that their positions all remained relative to one another. But I am sure I can figure out a way to achieve the end result I am looking for :) thank you
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2012

    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

  • flurospeedoflurospeedo Member Posts: 33
    Thanks @gyroscope, I'm working on a workaround. Yeah it's ashame it cuts out at 1520 and not 1536!
Sign In or Register to comment.