How to make actors appear as main character travels up the screen?

Okay,

So I know I posted a question like this yesterday and I thought I had got it working but it turns out it's not what I want :'(
So, let me set the scene for you:

I'm making a space-themed game where the main character travels vertically UP the screen (using a constrain attribute and control camera behaviour to follow the character) dodging asteroids and collecting coins as he travels. Basically, the further he travels and stays alive, the more points the player will score.

I'm practically finished the game BUT I can't get the asteroids to drop down properly as the character travels up the screen! With help from a friend I've met on here, I've tried a few methods: putting the asteroids on timers, spawning asteroids, having the character have a pixel area where, when approached, asteroids will fall but nothing is working properly :(

The scene itself isn't wrapped but my little character is. Any help would be SO appreciated as I'm so close to completing the game I can almost taste it :tongue:

Thank you :blush:

Comments

  • slinky1988slinky1988 Member, PRO Posts: 89

    I'm not 100% sure what you are trying to achieve but from what I am assuming you are trying to do, perhaps you could set the gravity on the asteroids so they move down and when they reach a point below the screen (-30+ on Y position) then change their y.position back to the top?

  • GoodnightMoonGoodnightMoon Member Posts: 23

    Hi @slinky1988, thank you for getting back to me ^_^

    Umm.. Could you be a bit more specific please? I'm super new to this and have exhausted almost every option! The solution is probably really easy but I just can't seem to put my finger on it

    Thank you so much!

  • IceboxIcebox Member Posts: 1,485
    • Use accelerate behavior set the direction to 270 (down) at a speed you want or
    • change attribute motion linear velocity y to a negative(down) number(speed) or
    • Change velocity behavior and set the direction 270(down) or
    • Go to the actor and set its motion velocity to a negative number like this

    use any of the 4 options to get your actor to go down

  • GoodnightMoonGoodnightMoon Member Posts: 23

    Thank you so much for your comment @Icebox!

    However, the problem I'm having is that because I have a scrolling game that is vertically about 1,500 pixels long, I'm setting my asteroids at the top of the scene as well as the bottom. So basically by the time my character reaches the top or the higher he gets, the asteroid actors that were placed at the top will have already fallen down. It's kinda hard to explain and usually I predict that a Timer and the Move behaviour would have solved this issue but for some reason it just isn't working for me.

  • slinky1988slinky1988 Member, PRO Posts: 89

    I'm still not sure what your trying to do properly. Do you have any movement behaviours in the asteroids? And what does the timer trigger? Might be easier if you posted briefly the rules you are using so we can see where problems might occur.

Sign In or Register to comment.