• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Help with a custom skill!

Status
Not open for further replies.
Level 3
Joined
Sep 1, 2010
Messages
53
Hey guys, I am new here on the HiveWork community, and a real noob with GUI...
Well, I am making a custom map just for fun, and I need help with an ability that I am making for a hero here!
The ability is like this:
It has 3 levels, and it is an aura.
Everytime units under the effect of this aura attack an enemy, they have a chance of casting a chain lightning spell!
Well, if it is too complicated to make all units under this effect, (which will probably be for me), you can help me do just the Hero with the aura!
I already know the basics using variables, and etc...
Hope you guys can help me :)
Thanks
 
Level 7
Joined
Jun 15, 2010
Messages
218
sample
Events
Unit - A unit Is attacked
Conditions
Actions
Set dice = (Random integer number between 1 and 10)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Attacking unit) has buff Brilliance Aura) Equal to True) and (dice Equal to 2)
Then - Actions
Unit - Add Chain Lightning to (Attacking unit)
Unit - Order (Attacking unit) to Orc Far Seer - Chain Lightning (Attacked unit)
Else - Actions
Do nothing


dice = interger variable
Is this what u mean?
 
Level 3
Joined
Sep 1, 2010
Messages
53
well, kinda, but I need to use variables to make a chance of the secondary effect happen, well, the aura has 3 levels, each level increases the chance by 10%, starting with 10% too.
and the chain lightning gets stronger with each level too...
 
Level 3
Joined
Sep 1, 2010
Messages
53
well, I tried your way and it worked :D
well, I will just try to add variables to set the skill level, chance and etc. thanks!
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Setting the Buff comparison as trigger condition would be more efficient.. just sayin'

Also you might want to use a dummy unit.

Set tempoint = Position of (Attacking Unit)
Unit - Create one *dummy* for (Owner of Attacking Unit) at temppoint facing x degrees
Unit - Add Chain Lightning to (Last Created Unit)
Unit - Order (Last Created Unit) to Orc Far Seer - Chain Lightning (Triggering Unit)
Custom script: call RemoveLocation(udg_temppoint)

A dummy normally has no model (set model path to '.mdx') and no shadow.
The chainlightning therefore also requires no mana and you can kill the dummy using Unit - Add a 0.5s generic expiration timer to Last Created Unit.
Also, add the locust-skill to said dummy to prevent the dummy being created elsewhere and not directly on your attacking unit.

Few ideas to improve your triggering ;D
 
Level 3
Joined
Sep 1, 2010
Messages
53
thanks for both of you guys :D
the skill worked perfectly!
I used the dummy unit to cast the chain lightning :)
and I done a couple more abilities that are a little bit like this one and it worked perfectly too :D
 
Status
Not open for further replies.
Top