• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Dummy unit spell lags...

Status
Not open for further replies.
Level 10
Joined
Mar 17, 2012
Messages
582
Hi there!
Well, I have a pretty simple spell which is called "Tripple Shot". When a hero casts it, 3 dummies appear and attack the target. But when they appear fo the first time in the game, 1-second lag takes place that is not good.
I've already tried making a preload (creating a dummy on the map and removing it on a map initialization). Also I've tried creating and removing this unit in the beginning of the game.
I've even tried creating a special effect to get rid of this lag...

Any ideas?? :vw_wtf:

Here are the triggers:
Init:
  • Triple Shot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Triple Shot
    • Actions
      • Set Player_Number_Int = (Player number of (Owner of (Triggering unit)))
      • Set Triple_Shot_Caster[Player_Number_Int] = (Triggering unit)
      • Set Triple_Shot_Target[Player_Number_Int] = (Target unit of ability being cast)
      • Set Triple_Shot_Point[Player_Number_Int] = (Position of Triple_Shot_Caster[Player_Number_Int])
      • Set Triple_Shot_Damage[Player_Number_Int] = ((Real((Strength of Triple_Shot_Caster[Player_Number_Int] (Include bonuses)))) x (((Real((Level of Triple Shot for Triple_Shot_Caster[Player_Number_Int]))) x 0.05) + 0.50))
      • Set Triple_Shot_Number[Player_Number_Int] = 3
      • Trigger - Turn on Triple Shot loop <gen>
Loop:
  • Triple Shot loop
    • Events
      • Time - Every 0.15 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Triple_Shot_Number[(Integer A)] Greater than 0
            • Then - Actions
              • Set Triple_Shot_Number[(Integer A)] = (Triple_Shot_Number[(Integer A)] - 1)
              • Unit - Create 1 Triple Shot dummy dummy for (Owner of Triple_Shot_Caster[(Integer A)]) at Triple_Shot_Point[(Integer A)] facing Default building facing degrees
              • Unit - Add a 0.15 second Generic expiration timer to (Last created unit)
              • Unit - Add DAMAGE 100-900 to (Last created unit)
              • Unit - Set level of DAMAGE 100-900 for (Last created unit) to (((Integer(Triple_Shot_Damage[(Integer A)])) / 100) + 1)
              • Unit - Add DAMAGE 10-90 to (Last created unit)
              • Unit - Set level of DAMAGE 10-90 for (Last created unit) to ((((Integer(Triple_Shot_Damage[(Integer A)])) mod 100) / 10) + 1)
              • Unit - Add DAMAGE 1-9 to (Last created unit)
              • Unit - Set level of DAMAGE 1-9 for (Last created unit) to (((Integer(Triple_Shot_Damage[(Integer A)])) mod 10) + 1)
              • Unit - Order (Last created unit) to Attack Triple_Shot_Target[(Integer A)]
            • Else - Actions
              • Custom script: call RemoveLocation(udg_Triple_Shot_Point[GetForLoopIndexA()])
 
Last edited:
Status
Not open for further replies.
Top