• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Charge problem....

Status
Not open for further replies.
Level 10
Joined
Jan 19, 2010
Messages
393
Hello... PLS can you help me? What is bad on this script(isnt mooving caster)

HashTable Load
  • Charge HashTable
    • Události
      • Map initialization
    • PodmÃ*nky
    • Činnosti
      • -------- HashTable save --------
      • Hashtable - Create a hashtable
      • Set HashTable = (Last created hashtable)
Charge Start
  • Charge start
    • Události
      • Jednotka - A unit Schopnost začÃ*ná účinkovat
    • PodmÃ*nky
      • (Ability being cast) Rovná se Charge!
    • Činnosti
      • Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Target unit of ability being cast)) in HashTable
      • -------- Caster save --------
      • Hashtable - Save Handle Of(Target unit of ability being cast) as 2 of (Key (Target unit of ability being cast)) in HashTable
      • -------- Target save --------
      • Hashtable - Save (Distance between (Position of (Load 1 of (Key (Target unit of ability being cast)) in HashTable)) and (Position of (Load 2 of (Key (Target unit of ability being cast)) in HashTable))) as 3 of (Key (Casting unit)) in HashTable
      • -------- Disrance save --------
      • Hashtable - Save (Angle from (Position of (Load 1 of (Key (Target unit of ability being cast)) in HashTable)) to (Position of (Load 2 of (Key (Target unit of ability being cast)) in HashTable))) as 4 of (Key (Target unit of ability being cast)) in HashTable
      • -------- Angle save --------
      • SpÃ*nač - Turn on Charge loop <gen>
Charge Loop
  • Charge loop
    • Události
      • Čas - Every 0.01 seconds of game time
    • PodmÃ*nky
    • Činnosti
      • Jednotka - Pozastaveno (Load 2 of (Key (Target unit of ability being cast)) in HashTable)
      • -------- Target block --------
      • Jednotka - Turn collision for (Load 1 of (Key (Target unit of ability being cast)) in HashTable) Vypnout
      • -------- Caster collision off --------
      • Jednotka - Move (Load 1 of (Key (Target unit of ability being cast)) in HashTable) instantly to ((Position of (Load 1 of (Key (Target unit of ability being cast)) in HashTable)) offset by ((Load 3 of (Key (Target unit of ability being cast)) from HashTable) x 0.01) towards (Load 4 of (Key (Target unit of ability being cast)) from HashTable) degrees), facing (Position of (Load 2 of (Key (Target unit of ability being cast)) in HashTable))
      • -------- Caster move to target --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Jestliže - podmÃ*nky
          • (Distance between (Position of (Load 1 of (Key (Target unit of ability being cast)) in HashTable)) and (Position of (Load 2 of (Key (Target unit of ability being cast)) in HashTable))) MenÅ¡Ã* nebo rovno 50.00
        • Potom - akce
          • Animace - Play (Load 1 of (Key (Target unit of ability being cast)) in HashTable)'s attack 2 animation
          • -------- Caster animation --------
          • Jednotka - Cause (Load 1 of (Key (Target unit of ability being cast)) in HashTable) to damage (Load 2 of (Key (Target unit of ability being cast)) in HashTable), dealing 300.00 damage of attack type Hrdina and damage type Blesk
          • -------- Caster demaging target --------
          • Jednotka - Nepozastaveno (Load 2 of (Key (Target unit of ability being cast)) in HashTable)
          • -------- Target block --------
          • Jednotka - Turn collision for (Load 1 of (Key (Target unit of ability being cast)) in HashTable) Zapnout
          • -------- Caster Collision on --------
          • SpÃ*nač - Turn off (This trigger)
          • -------- End of spell --------
        • Jinak - akce
          • Animace - Play (Load 1 of (Key (Target point of ability being cast)) in HashTable)'s ready animation
          • -------- Caster animation --------
Thx For Help.

Link: http://www.hiveworkshop.com/forums/pastebin.php?id=9byfl9
 
Yeah, you don't move him properly. You use Target unit of ability being cast in the loop trigger, which doesn't work, because the event has nothing to do with the Target unit of ability being cast. In order to make this work, add the caster in a unit group, save the target unit to the caster and in the loop trigger pick every unit in the unit group the caster was added and load the target from the picked unit. Else, just get an authentic knockback, in the Spells section.
 
Level 10
Joined
Jan 19, 2010
Messages
393
Yeah, you don't move him properly. You use Target unit of ability being cast in the loop trigger, which doesn't work, because the event has nothing to do with the Target unit of ability being cast. In order to make this work, add the caster in a unit group, save the target unit to the caster and in the loop trigger pick every unit in the unit group the caster was added and load the target from the picked unit. Else, just get an authentic knockback, in the Spells section.

OK and it will work as gui or mui? (this is my first work with hashtables)
 
Status
Not open for further replies.
Top