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

[Spell] Spell description as counter

Status
Not open for further replies.
Level 4
Joined
Dec 25, 2012
Messages
66
Ability: Dancing Sword
Type: Passive
Desc: Gives a 33% chance to perform a swipe, striking all enemies around. Every time it procs, it adds +1 to "rotation counters" (var_rCon).

Ability:RotationCounter
Type:dummy
Desc: simply displays the rotation counters number in its description.

Player needs to know how much rotation counters he has stored. In order to do so, I've created a dummy ability (rotationcounter), which has 25 levels (max. value for var-rCon), and the following set of triggers:


Add the dummy:
  • Events: A unit learns an ablity
  • Conditions: Learned ability is Dancing Sword
  • Actions: Unit - add RotationCounter to learning hero

  • Events: a unit is attacked
  • Conditions: Attacking unit has ability Dancing Sword
  • Actions:
  • If all conditions are true then multiple actions:
    • Condition: <Passive proc's>
    • Actions:
    • <damage, animation, etc.>
    • Set Variable var_rCon to var_rCon+1
    • Unit - set level of RotationCounter to var_rCon

Works fine, except that the level of the dummy changes not directly on proc, but when the unit is given a different order.

Example:

Hero attacks a target. He has Dancing Sword lvl5 and RotationCounter, which displays "1" as a description.

wc3scrnshot012613001646.jpg



Dancing Sword procs 4 times. Hero keeps attacking. It procs 3 more times. Level of RotationCounter, however, has not increased, and it displays "1" as before.

wc3scrnshot012613001655.jpg


Then, hero is given a move order. Upon executing that order, level of RotationCounter immideately jumps to 7. Now its desc. displays "7".

wc3scrnshot012613001658.jpg


How to fix the dummy ability to refresh on time? is there another way to display such information (variable) without the use of multiboards/text-messages? Thankyou!

P.S: Nevermind the endurance aura. that is a spell the dummy is based upon. If you're wondering what are the rotation counters for, they are used for the last ability and serve as damage modifiers.
 
Level 16
Joined
Aug 7, 2009
Messages
1,406
The one you're looking for is only two "actions", and it's kinda obvious: you need to add and remove a "dummy" ability to the unit instantly. To make sure you don't add then remove an ability that the hero already has, you should either:

1) choose one that's impossible for the hero to has;
2) create a dummy one specifically for this purpose, and use it.
 
Level 4
Joined
Dec 25, 2012
Messages
66
The one you're looking for is only two "actions", and it's kinda obvious: you need to add and remove a "dummy" ability to the unit instantly. To make sure you don't add then remove an ability that the hero already has, you should either:

1) choose one that's impossible for the hero to has;
2) create a dummy one specifically for this purpose, and use it.

Oh, I see what you're saying. I did try it the first time I made that ability, however, adding/removing a dummy creates quite recognizable lag, almost 0.5 sec. There has to be another way.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Preload means adding the ability to a dummy unit (or even a normal unit since this event is fired before you can see the actual map) at Map Initialization then remove the dummy. You will need about 3-4 lines for this in your Map Init trigger. Good luck :D
 
Level 4
Joined
Dec 25, 2012
Messages
66
:vw_wtf: What machine are you running it on ? You have probably done something rly whrong in your triggers.

Edit// Will help too ^

My laptop is quite capable (msiGT683) of running warcraft, so specs should not pose any issues. I will check on preloading though, thanx!
 
Level 4
Joined
Dec 25, 2012
Messages
66
Hmph, I've discovered a (weird) way to make it work. Remember the Endurance Aura I based the dummy RotationCounter on? Clearing the "buffs" field for ALL levels of this aura made the description refresh on time... at the cost of slapping the default buff for Endurance Aura back on (even when the "buff" field is set empty in object editor). Weird.

Off to test preloading...
 
Status
Not open for further replies.
Top