- Joined
- Nov 12, 2006
- Messages
- 765
I created a star wars risk map. however there is a consistent bug that occurs im stumped on how to fix. in the map, their is a city, a tower, a circle of power and usually a unit inside the circle of power. once u kill the unit the city and tower go to you. however sometimes the Unit A (attacking the guy in the circle) dies right as he is killing Unit B (the guy defending inside the circle). it seems that when this happens, the city and tower go to neutral. now when a unit goes into the circle of power its supposed to change ownership to you, but this doesn't happen when the tower and city are neutral.
example of ownership trigger designed for an empty COP:
to try and correct this issue - i manufactured this situation with some triggers in place, so that every 7 seconds any neutral hostile/passive/victim/extra would instantly change ownership to brown (which is an empty slot), hoping that maybe if its not one of the neutrals the ownership change trigger would work. well it didn't.
so if anyone has any ideas on how to create a (short?) system so that when a unit leaves the circle of power, it will definitely control it if their are no other players in the region. thanks!
example of ownership trigger designed for an empty COP:
-
Events
- Unit - A unit enters Hoth Echo Base <gen>
-
Conditions
- ((Units in Hoth Echo Base <gen> owned by (Owner of Hoth - Echo Base 0001 <gen>)) is empty) Equal to True
-
Actions
- Unit - Change ownership of Hoth - Echo Base 0001 <gen> to (Owner of (Triggering unit)) and Change color
- Unit - Change ownership of Laser Turret 0042 <gen> to (Owner of (Triggering unit)) and Change color
-
Events
- Unit - A unit owned by Player 1 (Red) Dies
- Unit - A unit owned by Player 2 (Blue) Dies
- Unit - A unit owned by Player 3 (Teal) Dies
- Unit - A unit owned by Player 4 (Purple) Dies
- Unit - A unit owned by Player 5 (Yellow) Dies
- Unit - A unit owned by Player 6 (Orange) Dies
- Unit - A unit owned by Player 7 (Green) Dies
- Unit - A unit owned by Player 8 (Pink) Dies
- Unit - A unit owned by Player 9 (Gray) Dies
- Unit - A unit owned by Player 10 (Light Blue) Dies
- Unit - A unit owned by Player 11 (Dark Green) Dies
- Unit - A unit owned by Player 12 (Brown) Dies
-
Actions
- Unit - Change ownership of (Triggering unit) to Neutral Victim and Retain color
- If (((Hoth Echo Base <gen> contains (Triggering unit)) Equal to True) and ((((Units in Hoth Echo Base <gen> owned by (Owner of Hoth - Echo Base 0001 <gen>)) is empty) Equal to True) and ((Unit-type of (Killing unit)) Not equal to Laser Turret))) then do (Unit - Move (Killing unit) instantly to (Center of Hoth Echo Base <gen>), facing Default building facing degrees) else do (Do nothing)
- If (((Hoth Ion Cannon <gen> contains (Triggering unit)) Equal to True) and ((((Units in Hoth Ion Cannon <gen> owned by (Owner of Hoth - Ion Cannon 0003 <gen>)) is empty) Equal to True) and ((Unit-type of (Killing unit)) Not equal to Laser Turret))) then do (Unit - Move (Killing unit) instantly to (Center of Hoth Ion Cannon <gen>), facing Default building facing degrees) else do (Do nothing)
- If (((Hoth Wampa Lair <gen> contains (Triggering unit)) Equal to True) and ((((Units in Hoth Wampa Lair <gen> owned by (Owner of Hoth - Wampa Lair 0005 <gen>)) is empty) Equal to True) and ((Unit-type of (Killing unit)) Not equal to Laser Turret))) then do (Unit - Move (Killing unit) instantly to (Center of Hoth Wampa Lair <gen>), facing Default building facing degrees) else do (Do nothing)
- If (((Hoth North Ridge <gen> contains (Triggering unit)) Equal to True) and ((((Units in Hoth North Ridge <gen> owned by (Owner of Hoth - North Ridge 0006 <gen>)) is empty) Equal to True) and ((Unit-type of (Killing unit)) Not equal to Laser Turret))) then do (Unit - Move (Killing unit) instantly to (Center of Hoth North Ridge <gen>), facing Default building facing degrees) else do (Do nothing)
to try and correct this issue - i manufactured this situation with some triggers in place, so that every 7 seconds any neutral hostile/passive/victim/extra would instantly change ownership to brown (which is an empty slot), hoping that maybe if its not one of the neutrals the ownership change trigger would work. well it didn't.
so if anyone has any ideas on how to create a (short?) system so that when a unit leaves the circle of power, it will definitely control it if their are no other players in the region. thanks!