How do I switch between n sprites?

Get help using Construct 2

Post » Sun Apr 13, 2014 3:45 pm

I would like to have multiple sprites (players) and switch with right mouse click between different instances. The selected instance should react to left mouse button clicks. How can I do that?
B
3
Posts: 3
Reputation: 181

Post » Sun Apr 13, 2014 3:53 pm

Perhaps something like left mouse button clicked. Then a global variable 1 = p1 2 =p2 ect.

Then if variable =2 disable platformer behavior for p1 and enable it for p2.

Then just add the scroll behavior and have the screen scroll to which ever player you want.
B
8
S
1
Posts: 76
Reputation: 949

Post » Sun Apr 13, 2014 4:21 pm

Yes, thanks. But as I saw I have to specify in the event sheet for which player the event happens (for example left click). How to define selection of one of multiple instances?
B
3
Posts: 3
Reputation: 181

Post » Sun Apr 13, 2014 4:35 pm

Well without a capx its hard to tell exactly but when the sprite is clicked on have it set the variable to the corresponding player.

On "p2" clicked left mouse button set variable to "2"

Then have when variable is =2 set blah blah and then just have it turn off control for the others.
B
8
S
1
Posts: 76
Reputation: 949

Post » Sun Apr 13, 2014 4:40 pm

will try that, thanks!
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: boybacteria, dop2000, Microbex and 38 guests