- Joined
- Sep 28, 2004
- Messages
- 365
**yeap, i used search and look through other threads, i even looked through Pharoah_'s earth fury spell.
But i still don't get how to save Timer into Hashtable and make it MUI. I tried and here is the code. Please let me know what is wrong. It is still not MUI.
**Please note that the spell i made can be simplified with locals or i can just use periodic timer. But the main point here is for me to understand Timer in a Hashtable. This is just a simple code i do to understand how to store Timer in hashtable but unfortunately it didn't work. :[
But i still don't get how to save Timer into Hashtable and make it MUI. I tried and here is the code. Please let me know what is wrong. It is still not MUI.
**Please note that the spell i made can be simplified with locals or i can just use periodic timer. But the main point here is for me to understand Timer in a Hashtable. This is just a simple code i do to understand how to store Timer in hashtable but unfortunately it didn't work. :[
-
Delay Blast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Delay Blast
-
Actions
- -------- ---------------------------------------------- --------
- -------- Globals --------
- -------- ---------------------------------------------- --------
- Set db_Pos = (Target point of ability being cast)
- Set db_DelayDuration = 3.00
- -------- ---------------------------------------------- --------
- -------- Spell --------
- -------- ---------------------------------------------- --------
- Unit - Create 1 Footman for Player 1 (Red) at db_Pos facing Default building facing degrees
- Hashtable - Save Handle Ofdb_Timer as (Key time) of (Key (Last created unit)) in db_Table
- Countdown Timer - Start (Load (Key time) of (Key (Last created unit)) in db_Table) as a One-shot timer that will expire in db_DelayDuration seconds
- Set db_X = (X of db_Pos)
- Set db_Y = (Y of db_Pos)
- Hashtable - Save db_X as (Key x) of (Key (Last started timer)) in db_Table
- Hashtable - Save db_Y as (Key y) of (Key (Last started timer)) in db_Table
- Hashtable - Save Handle Of(Last created unit) as (Key dummy) of (Key (Last started timer)) in db_Table
- -------- ---------------------------------------------- --------
- -------- Clear --------
- -------- ---------------------------------------------- --------
- Custom script: call RemoveLocation(udg_db_Pos)
-
Events
-
DB timer ends
-
Events
- Time - db_Timer expires
- Conditions
-
Actions
- Set db_X = (Load (Key x) of (Key (Expiring timer)) from db_Table)
- Set db_Y = (Load (Key y) of (Key (Expiring timer)) from db_Table)
- Special Effect - Create a special effect at (Point(db_X, db_Y)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Kill (Load (Key dummy) of (Key (Expiring timer)) in db_Table)
- Hashtable - Clear all child hashtables of child (Key (Expiring timer)) in db_Table
-
Events