How do I make many start- Points for my player ?

0 favourites
  • 7 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello everyone,

    I'm making a game and I have some positions on the screen as start points and end points. When my player character comes to an end point I want it starts again in a second start point, then it ends on a second end point and goes to a third start point and so on...

    I thought I can do it putting an object called "start point" and a second one called "end point" but how can I do the events to put the consecutive transitions on the player: first the one point, then the seconds one, then the third... how could I mark the instances of the objects to perform the correct actions ?...

    Thank you very much for reading.

  • Give the startpoint instance variables from 1 to X, and global/player variable startpoint. Now on collision with endpoint, have condition 'startpoint compare variable = player.variable' increase the player variable by one and do 'set position to startpoint x,y'

  • Not quite sure what you mean ...but i think you are talking about something like this...

    There are many ways to do this but one simple way is to make a new instance Variable for the Player..

    Call it something like "Player_Spawn_Point" or similiar

    it could be a Number or a Text Variable

    When the player dies. add an event that adds to the Number Variable or resets the Text Variable to the Correct Location ..

    for example

    on player death -> add 1 to 'Player_Spawn_Point'

    Make sure that Each Physical location spawn point is numbered and the Value correlates to the Spawn Point Variable

    so that when you Respawn the player..you do a check for the Player Spawn Point Variable and set the player to the New Spawn point

    with

    "Player -> on created/respawned

    -> set Player position to "Spawn point(Player_Spawn_Point Variable Value)"

    and it should work

    Does that make sense>?

  • yeah same this as what vee41 said....but different words :)

  • yeah same this as what vee41 said....but different words :)

    mystazsea A lot better said, I typed that on mobile and came back to edit it for my text to be actually comprehensible, but you kind of did it already :)

  • Thank you very much vee!... :)

    that's the way I did it and it worked fine!.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much mystazsea,

    it's too much clear now, thanks both, I made it the way you explained to me.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)