use ownership of entering unit = force 2
By force 2 you mean team 2 or player 2?
Depending on which one, simply put "triggering player equal to player 2" or "triggering player equal to allies of player 2 (or whatever player is in team 2)" as a condition
Like DSG said, you can use Player Group to run the trigger if the entering unit is an enemy or an ally for the 'trap'. Here's an example of making one.
Team Initialization
Events
Map initialization
Conditions
Actions
-------- Team 1 --------
Player Group - Add Player 1 (Red) to Team[1]
-------- Team 2 --------
Player Group - Add Player 2 (Blue) to Team[2]
Rekt newb
Events
Unit - A unit enters Team 1 Reg <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Entering unit)) is in Team[1]) Equal to False
Then - Actions
-------- When enemy players' unit enters --------
Unit - Kill (Triggering unit)
Else - Actions
-------- When ally players' unit enters --------
Do nothing
It is a boolean test, player is in player group or something like that.Don't have a clue to how to set that option you did, tried all the options in "If - Conditions"
I assume you used an "or" block for that condition, otherwise it is not possible for the owner of triggering unit to be 2 different players at the same time so the then actions will never run.
Be aware that Do Nothing really does nothing. It is only needed for the RoC non-block conditional actions.
It should work depending on what you wanted to be, but it's messy and unorganized for obvious reason.I've created
Multiple Functionslf (All conditions are true) then do (Then Actions) else do (Else Actions)
if Conditions - (Owner of (triggering unit)) Equal to (==) Purple
then Actions - Unit group - Order (units in Trap <gen>) to Special Medivh - Human form
else Actions - do nothing
So now I've copied this 3 times and in each changed owner of triggering unit to different computer enemy color
and so now whenever any unit of those colors enters the trap the Statues transform using Crow ability, change ownership from neutral to Player1 and automaticly attack the enemy![]()
The computer scientist in me dies a little every time I see someone do that...So now I've copied this 3 times and in each changed owner of triggering unit to different computer enemy color
It should work depending on what you wanted to be, but it's messy and unorganized for obvious reason.
You can use "Or - Multiple Conditions" inside the "If" block, that way it's more cleaner and easier for you to read.
Trap
Events
Unit - A unit enters Trap <gen>
Conditions
Actions
-------- Enemy Computers --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
Then - Actions
Unit Group - Order (Units in Trap <gen>) to Special Medivh - Human Form
Else - Actions
-------- Other actions below --------
The computer scientist in me dies a little every time I see someone do that...
I suggest doing what bear_369 has posted as it is infinitely more readable and maintainable. It does not duplicate the actions 4 times so if you ever want to change them you only have to change them in 1 place. This is less prone to making mistakes and results in higher triggering productivity.
I didn't understand, could you elaborate how it's used in RoC?Do Nothing really does nothing. It is only needed for the RoC non-block conditional actions.
RoC does (or did) not have the block if then else actions. It only had the single condition single line action if then else. Since all arguments must be valid, one needed to specify an action for both the then and else parameters. If you did not want it to do anything, that action had to be Do Nothing, hence the name and what it does. With the block based if then else actions this is not needed as it is valid to leave one of the blocks empty.I didn't understand, could you elaborate how it's used in RoC?