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

Get help using Construct 2

Post » Tue Aug 13, 2013 4:14 am

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.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Tue Aug 13, 2013 5:22 am

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'
B
24
S
9
G
7
Posts: 756
Reputation: 7,312

Post » Tue Aug 13, 2013 5:25 am

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>?
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Tue Aug 13, 2013 5:26 am

yeah same this as what vee41 said....but different words :)
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Tue Aug 13, 2013 6:39 am

[QUOTE=mystazsea] yeah same this as what vee41 said....but different words :)[/QUOTE]

@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 :)
B
24
S
9
G
7
Posts: 756
Reputation: 7,312

Post » Tue Aug 13, 2013 2:25 pm

Thank you very much vee!... :)
that's the way I did it and it worked fine!.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Tue Aug 13, 2013 2:27 pm

Thank you very much mystazsea,
it's too much clear now, thanks both, I made it the way you explained to me.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 47 guests