• 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!

Lag Problem with one Ability

Status
Not open for further replies.
Level 16
Joined
Feb 22, 2006
Messages
960
Hi you,
I have a little problem with one of my ability. It increases the strenght of a unit by 5 every second (i did it with the attribute ability) but every time the ability is used the first time in the map there is a 4 second freeze on my monitor and then the map goes on without problems.

So, this is the first trigger, it adds the attribute ability to the casting unit
  • Rampage Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rampage
    • Actions
      • Unit - Add Rampage(Str) to (Casting Unit)
this is the second trigger, which is increasing the level and stop if the rampage variable reaches a specific number
  • Rampage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in(Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) esle do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Rampage) Equal to True
            • Then - Actions
              • Set TempInt = (Player number of (Owner of (Picked unit))
              • Set rampage[TempInt] = (rampage[TempInt] + 1)
              • Unit - Set Level of Rampage(Str) for (Picked unit) to ((Level of Rampage(Str) for (Picked unit)) + 1)
              • If (All Conditions are True) then do (Then Actions) esle do (Else Actions)
                • If - Conditions
                  • rampage[TempInt] Equal to ((Level of Rampage for (Picked unit) x 4)
                • Then - Actions
                  • Unit - Remove Rampage(Str) from (Picked unit)
                  • Set rampage[TempInt] = 0
                • Else - Actions
          • Else - Actions
I hope someone can help me, because the lag realy sucks :O

greetings from germany :p
 
create a dummy in initakization trigger and add it an custom ability that you use for your spell like this(this is on my map)
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Neutral Passive at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Taste of Death(dummy) to (Last created unit)
      • Unit - Add Unholy Frenzy to (Last created unit)
also remove unit group(when you dont need it anymore)
 
Status
Not open for further replies.
Top