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

[Solved] Fixing lag when spell casted the first time

Status
Not open for further replies.
Level 16
Joined
Mar 25, 2016
Messages
1,327
I don't know what this spell does, but usually you can use the spell on map initialization on a dummy unit and then remove the dummy unit afterwards. Something like this:
Create dummy 1
Create dummy 2
add expiration timers of 1 second to every dummy.
add spell to dummy 1
order dummy 1 to use spell on dummy 2
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
yeah, but I don't know if it's possible here, because abilities cannot be cast on map init as far as I know. I will try to figure out what exactly is causing the lag.

Edit:

Create this trigger or put the actions in a trigger that runs at map initialization.

The ability Dummy Damage, which has 100 levels takes a long time to load. If you load it on map initialization there will be no lag when you use it.

  • Preload
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempLoc = (Point(0.00, 0.00))
      • Unit - Create 1 Footman for Neutral Passive at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Unit - Add Dummy Damage to (Last created unit)
      • Unit - Remove (Last created unit) from the game
 
Last edited:
Status
Not open for further replies.
Top