| 09-05-2004, 10:15 AM | #1 |
Hi guys, i hope my questions won't sound just too stupid ... ^_^ I want to convert one of my already done spell triggers to JASS because it uses a lot of variables and i just wanted to try out local variables and JASS in general. First, here's the already done spell: Storm Attack Makes the Hero bash a Target Unit so hard it gets knocked back, crashes through trees, and suffers extra damage per tree. 3 Triggers: Storm Attack Activator ; Starts the other triggers and sets variables Storm Attack Movement ; Moves the Target Unit, damages it and kills trees Storm Attack Stop ; Stops Movement, Resets Triggers 9 Variables: StormAttack_Caster StormAttack_Target StormAttack_Angle StormAttack_Damage StormAttack_DoneDistance StormAttack_TotalDistance StormAttack_TreeCount SATimer_Totaltimer SATimer_Movementtimer ...wait... QUESTION: Since i use repeating timers to move my Target and to end the spell after 2 seconds, i can't put this all into a single JASS spell. Maybe i could use a "For Each Integer from 1 to 40, Do Move StormAttack_Target to Temp_Position (I'm using this to avoid memory leaks, it's StormAttack_Target's position, later it do call RemoveLocation (udg_Temp_Position)) offset by (TotalDistance / 40)... But then i would need a WAIT Trigger, and I've been warned not to use these. Aren't there other ways, or can i use a Call TriggerSleep thingy ? |
