- Joined
- Mar 15, 2012
- Messages
- 2,877
I followed a certain tutorial on here and can't seem to get this working, could anyone help explain what I am doing wrong? Apparently I am able to save unique ID's of units and load them back again so I was trying to save the damage of every/any unit however it's only adding one value and loading it to display text...
[trigger=]
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Hashtable - Create a hashtable
Set BT_Table = (Last created hashtable)
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Peasant for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
[/trigger]
[trigger=]
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Set aunit = (Triggering unit)
Hashtable - Save Handle Of(Triggering unit) as 0 of (Key aunit) in BT_Table
Hashtable - Save 0.00 as 1 of (Key aunit) in BT_Table
[/trigger]
[trigger=]
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
Actions
Hashtable - Save ((Load 1 of (Key aunit) from BT_Table) + GDD_Damage) as 1 of (Key aunit) in BT_Table
Game - Display to (All players) the text: (Name of GDD_DamageSource)
Game - Display to (All players) the text: (String((Load 1 of (Key aunit) from BT_Table)))
[/trigger]
[trigger=]
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Hashtable - Create a hashtable
Set BT_Table = (Last created hashtable)
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Create 1 Peasant for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
[/trigger]
[trigger=]
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Set aunit = (Triggering unit)
Hashtable - Save Handle Of(Triggering unit) as 0 of (Key aunit) in BT_Table
Hashtable - Save 0.00 as 1 of (Key aunit) in BT_Table
[/trigger]
[trigger=]
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
Actions
Hashtable - Save ((Load 1 of (Key aunit) from BT_Table) + GDD_Damage) as 1 of (Key aunit) in BT_Table
Game - Display to (All players) the text: (Name of GDD_DamageSource)
Game - Display to (All players) the text: (String((Load 1 of (Key aunit) from BT_Table)))
[/trigger]