I got my map got square / inside the square i made Region
I want make change terrain to Grass trim if someone build there
and if the owner die of the first building the terrain change to Dirt
i made simple trigger working . but i got 1 problem if blue or anyone else die all region turn to dirt can i set if you are the first to build you are the owner and only your terrain change to dirt if you die
can we assign to player those trigger
Here what i got
Last edited by SoldierDuMM; 07-04-2009 at 10:35 PM.
Just use a player variable for it...
Set the player variable to the owner of the builder and then create an if/then/else:
If Player_Variable = owner of entering unit
Then [all your actions]
Else you can create a game message, or just don't do anything... your choice :/
Ohh, the triggers leak... fix the leaks immeadiately.
Just use a player variable for it...
Set the player variable to the owner of the builder and then create an if/then/else:
If Player_Variable = owner of entering unit
Then [all your actions]
Else you can create a game message, or just don't do anything... your choice :/
Ohh, the triggers leak... fix the leaks immeadiately.
Hm, I think I know what I've said wrong ^^
All right, set the Initial Value of the "Player" variable to "Neutral Hostile", or any unused player and do something like this: (Note: WE isn't open)
Trigger
First Trigger Events
Unit - a unit enters [region]
Conditions
((Triggering unit) is a structure) = true
Actions
set Loc = Center of [region] If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to Neutral Hostile
Then - Actions
Set Player[1] = (Owner of (Entering unit)) Environment - Create your deformation-thing at Loc Wait 0.30 seconds Environment - Terrain-change at Loc
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to (Owner of (Entering Unit))
Then - Actions
Environment - Create your deformation-thing at Loc Wait 0.30 seconds Environment - Terrain-change at Loc
Else - Actions
Custom script: call RemoveLocation(udg_Loc)
This assigns a player to the region, the terrain deformation/change only applies for that player.
If another player builds in that area, the terrain will not change.
Do the same for the second trigger, but use "Player[2]" or something...
Hm, I think I know what I've said wrong ^^
All right, set the Initial Value of the "Player" variable to "Neutral Hostile", or any unused player and do something like this: (Note: WE isn't open)
Trigger
First Trigger Events
Unit - a unit enters [region]
Conditions
((Triggering unit) is a structure) = true
Actions
set Loc = Center of [region] If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to Neutral Hostile
Then - Actions
Set Player[1] = (Owner of (Entering unit)) Environment - Create your deformation-thing at Loc Wait 0.30 seconds Environment - Terrain-change at Loc
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player[1] Equal to (Owner of (Entering Unit))
Then - Actions
Environment - Create your deformation-thing at Loc Wait 0.30 seconds Environment - Terrain-change at Loc
Else - Actions
Custom script: call RemoveLocation(udg_Loc)
This assigns a player to the region, the terrain deformation/change only applies for that player.
If another player builds in that area, the terrain will not change.
Do the same for the second trigger, but use "Player[2]" or something...
Question : "Unit - a unit enters [region]" How to you make Variable Region mean every region ?
because i got over 150 region i cant do all this for each player