Follow main player

Get help using Construct 2

Post » Thu Feb 20, 2014 7:19 pm

Hello! Thanks in advance.! I already made my main player to walk, run and jump (as Mario) and i want 2 things:
1. Another 4 character to follow the main player
2. Starting with the main player after he died, I want to control the movement of the second player, after second died I control the next one and so on.... For example is like having 5 Mario walking together one behind another after each one died I can control the next one.

Need help with that ... Please I will be appreciate it
B
5
Posts: 26
Reputation: 548

Post » Sun Feb 23, 2014 7:05 am

I would try giving them some instance variable which relates to who is in control.

like playerobject.playernumber
give them numbers 1 to 4.

have a variable indicating who currently is active
global: activeplayer

When picking the active player for control use: pick playerobject where playerobject.playernumber = activeplayer

when that player dies, subtract 1 from activeplayer.
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, MikaelS, nahima, Yahoo [Bot] and 17 guests