So, I am seeing up a scene (town) where Brown Pants and Blue Pants are just standing around. I am trying to find a way to click or select Brown and control him as my main player combatant. Then if I click or select blue pants he is swapped out and becomes my main combatant and brown pants just hangs where he was.
I was trying to do it without having to open any menus and just selecting the character. Is this possible?
Create a game event like this: - add an actor and enable Event Object - add a Set Player node, enable Use Game Object and select the event object actor
Add event interactions to your combatant prefabs that use the event (maybe overriding the click distance with -1 to allow clicking from whatever distance to the player).
You can optionally also add an Is Member node before the Set Player node to make sure the clicked combatant is part of the player group (in case the combatants are also used outside the player group).
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Create a game event like this:
- add an actor and enable Event Object
- add a Set Player node, enable Use Game Object and select the event object actor
Add event interactions to your combatant prefabs that use the event (maybe overriding the click distance with -1 to allow clicking from whatever distance to the player).
You can optionally also add an Is Member node before the Set Player node to make sure the clicked combatant is part of the player group (in case the combatants are also used outside the player group).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!