In the unit flags turn off "Cannot be clicked" then use a trigger on event "Unit is Clicked" to change the owner to the triggering player. That's the simple solution.
A more complex solution is to give your units a "claim neutral" ability of type effect-target, flag it as smart, set up smart validators to check that the unit is claimable, and have the effect apply a permanent behavior that sets the owner to the casting player (Player field under buff behavior.) You can also set a range and cast time when using this method.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
In the unit flags turn off "Cannot be clicked" then use a trigger on event "Unit is Clicked" to change the owner to the triggering player. That's the simple solution.
A more complex solution is to give your units a "claim neutral" ability of type effect-target, flag it as smart, set up smart validators to check that the unit is claimable, and have the effect apply a permanent behavior that sets the owner to the casting player (Player field under buff behavior.) You can also set a range and cast time when using this method.