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

How to pre-load custom abilities?

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2012
Messages
37
How to pre-load custom abilities, when I give a unit custom abilities via trigger, it will lag. So how do i do it?

Is this i should do it?

  • Preload
  • Preload
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Preload_Ability[2] = Flaming Sword
  • Flaming Sword
  • Flaming Sword
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Warrior's Power
    • Actions
      • Unit - Add Preload_Ability[2] to (Learning Hero)
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Edit: wrong info

When I add warror's power, the extra ability, flaming sword, will also add to my hero. After i add it sudden lag and no more.

what i suspect as the cause of the problem is :

  • Set Preload_Ability[2] = Flaming Sword
why did you need these ?

and

(Learning Hero) could be changed into (Triggering Unit)

i have tried several times to do this and it worked fine for me ..
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
i think the cause of the "lag" is because you add the ability to that unit :3
my map has a similar thing where a unit gains a item, add ability to the unit and it causes a slight lag for 0.3secs
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
You have to be smart with preloading. You don't want players to wait during loading screen for something they will hardly use nor find in the game.

Abilities with 4 levels are loaded pretty fast, and the lag spike isn't really noticeable; like in DotA; you experience a 0.01 lag spike no one cares about when a hero is picked because it just has 4 abilities with 4 levels. Even if you play in Deathmatch where you get a new hero everytime you die, the lag spike isn't important there.
 
Status
Not open for further replies.
Top