- Joined
- Nov 6, 2009
- Messages
- 1,456
Something in this isnt working properly and I cant figure out why lol I'm a hashtable noob plz help meh XD
-
Untitled Trigger 001
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
-



Loop - Actions
-




Set CustomValueCounter = (CustomValueCounter + 1)
-




Unit - Set the custom value of (Picked unit) to CustomValueCounter
-
-
-


Hashtable - Create a hashtable
-


Set ThreatTable = (Last created hashtable)
-


Set ThreatMultiplier[1] = 10
-


Set ThreatMultiplier[2] = 9
-


Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
-


Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally with shared vision
-
-
-
ThreatGenerating
-

Events
-


Unit - A unit Is attacked
-
-

Conditions
-


(Owner of (Triggering unit)) Equal to Neutral Hostile
-
-

Actions
-


Set ThreatGenerated1 = (Integer((Damage taken)))
-


Hashtable - Save (ThreatGenerated1 x ThreatMultiplier[(Player number of (Owner of (Attacking unit)))]) as (Custom value of (Attacked unit)) of (Player number of (Owner of (Attacking unit))) in ThreatTable
-


For each (Integer A) from 1 to 10, do (Actions)
-



Loop - Actions
-




Set ThreatInt = (Load (Custom value of (Attacked unit)) of (Player number of (Owner of (Attacking unit))) from ThreatTable)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






ThreatInt Greater than (Load (Custom value of (Attacked unit)) of (Integer A) from ThreatTable)
-
-





Then - Actions
-






Unit - Order (Attacked unit) to Attack (Attacking unit)
-






Game - Display to (All players) the text: (Test: + (Name of (Owner of (Attacked unit))))
-
-





Else - Actions
-
-
-
-
-





