• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] help with a trigger it dont fit

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • MultiWarstomp
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • For each (Integer LoopVariable) from 1 to 10, do (Actions)
        • Loop - Actions
          • Wait 0.01 seconds
          • Set TempPoint[0] = (Position of (Casting unit))
          • Set TempPoint[1] = (Target point of ability being cast)
          • Set TempPoint[2] = (TempPoint[0] offset by (100.00 x (Real(LoopVariable))) towards (Real(Angle)) degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LoopVariable Equal to 1
            • Then - Actions
              • Set Angle = (Integer((Angle from TempPoint[0] to TempPoint[1])))
            • Else - Actions
          • Unit - Create 1 Dummy Warstomp SUpEr MASS for (Owner of (Casting unit)) at TempPoint[2] facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Animation - Change (Last created unit)'s vertex coloring to (((Real(LoopVariable)) x 10.00)%, (100.00 - ((Real(LoopVariable)) x 10.00))%, 100.00%) with 0.00% transparency
          • Unit - Set level of War Stomp for (Last created unit) to (Level of Animate Dead for (Casting unit))
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
          • Custom script: call RemoveLocation(udg_TempPoint[0])
          • Custom script: call RemoveLocation(udg_TempPoint[1])
          • Custom script: call RemoveLocation(udg_TempPoint[2])
this trigger :S

its not fitting like i want the dummy yo be created faster i mean in this line like now it looks like he do warstomp then it creates dummy 1 sec after in a line :S not like i want :S
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
the problem is indee the wait. Yeah somewhere around 0.24 - 0.3
It is not always accurate

Try removing the wait and see what happends.
"casting unit" and "target unit of ability being cast" does not work properly after a wait. Either set the variables to these values before the wait, or remove the wait completely.

Also, waits inside a loop is appealed to be too corny. If you really need a wait inside, use a periodic timer event and rebase the trigger.
 
Status
Not open for further replies.
Top