How to spawn from the top of screen downwards?

michaeln93michaeln93 Member, PRO Posts: 68
edited May 2014 in Working with GS (Mac)

So I have a coin that I want to spawn from the top of the screen but it keeps spawning left to right?

I have a move behavior with direction 270 on the coin and a spawner with a timer that spawns the acorn direction 90.

So it should have spawn on top of the screen and move down right?

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @michaeln93 said:
    So I have a coin that I want to spawn from the top of the screen but it keeps spawning left to right?

    I have a move behavior with direction 270 on the coin and a spawner with a timer that spawns the [COIN] direction 90.

    >

    So it should have spawn on top of the screen and move down right?

    270 + 90 = 360.

    360° = facing right.

    I guess in your coin actor the 'Relative to:" part of the accelerate behaviour is set to 'actor' . . .

    Therefore it should move left to right.

    270 is down - 360 is right - 180 is left - 90 is up . . . so if you want your actor to go down then dump the extra 90° offset in the spawn behaviour (or if you need it for some reason, then make the coin's direction =180°) . . . or simply change the 'Relative to:" part of the coin's accelerate behaviour to 'Scene'.

    It seems like the obvious thing when faced with a problem like this would be to experiment, change the 90 to 0 or -90 (or anything) . . . or change the 270 to something else - experiment and see what happens - get a feel for what the numbers are actually doing - it's a good way to learn - if you were to play around with the values like this I'd be surprised if it took you more than a minute to solve the problem.

    P.S. Why did you put 90 into the spawner direction field, what were you trying to get it to do ?

  • michaeln93michaeln93 Member, PRO Posts: 68

    @Socks said:
    P.S. Why did you put 90 into the spawner direction field, what were you trying to get it to do ?

    Oh thanks man. Sry I didn't think they would add up. It works now.

    Btw, how do I make it spawn in order so it becomes sort of like an escalator instead of it randomly spawning at different x-axis location?

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @michaeln93 said:
    Btw, how do I make it spawn in order so it becomes sort of like an escalator instead of it randomly spawning at different x-axis location?

    Move the spawner left to right, spawn a coin every X seconds. That will give you a kind of ramp / escalator of coins.

Sign In or Register to comment.