How do I change/switch between player controllers?

  • Hi everybody!

    I wonder the way to switch between two or more playable characters (with some player controllers asociated) by pressing a button.

    Is there any way to do this?

    I appreciatte any help, because I'm stuck on my project because i can't do that :(

    Thanks and regards!

  • You could (and I'm sure there are better ways) put each player in a group with all it's attributes and movements and deactivate the groups that you don't want. Then on click activate the group (player) you want to use and deactivate the others.

    Like I said I'm still learning but that's what I would try if I was trying to figure it out...

    Hope this helps if not sorry.

  • Give the players a boolean, activeplayer false.

    Start with one activated.

    On click other character set other chars activeplayer to false and self active player to true.

    Control events could be assisted with boolean check as to which player to move.

  • Have you tried Pin behaviour ?

    It seems to be usefull in you case scirra.com/manual/99/pin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think that i understand Pin's concepto, but that is not what i want to do. What i wanna do is that you have three separated characters, in any place of the level. Then, if you press a key, the current character controller is deactivated and the character controller of the next character is activated, and so on.

    I don't get hoy Pin can help me to do this.

    In the other hand, Lennaert, how can i deactivate control event of a characters controlling it by a boolean?

  • Add a condition "character is boolean" to the control events.

    If the characters are very different in the way you control them, create groups with events that are only activated when a certain characters boolean is true.

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