• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Autocast skill with bonus damage from current mana

Status
Not open for further replies.
Level 2
Joined
Jan 24, 2012
Messages
28
Guys, how to make a autocast skill like searing arrow but it deal bonus damage from current mana point ?

And also how to make the bonus damage appear like critical spell ?

Plz help me... T_T
 
Level 7
Joined
Sep 9, 2007
Messages
253
make a real variable, I called it: Ability_SEARINGARROWS

  • Ability 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Searing Arrows
    • Actions
      • Set Ability_SEARINGARROWS = ((Mana of (Triggering unit)) / 100.00)
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - Ability_SEARINGARROWS)
      • Floating Text - Create floating text that reads (String((Integer(Ability_SEARINGARROWS)))) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (80.00%, 10.00%, 10.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 90.00 degrees
I set the amount of extra damage to be 1 hundredth of current mana. I thought you would want to the extra damage to be a small amount. You can change the calculation to whatever you like.
Does this work for you?
 
Level 2
Joined
Jan 24, 2012
Messages
28
yes, that's work... :grin:

but if the spell is autocast, the trigger won't active T_T
only normal searing arrow with no bonus damage T_T
 
Level 7
Joined
Sep 9, 2007
Messages
253
Ah sorry. I think the only way to detect autocast is using JASS code, I'm sure it's not too complicated.


There is another option you could use but it would mean you could ONLY have autocast, this method would not allow single castunless u turn the ability on and then quickly turn it off again after a single attack..... The way it works is you have one ability to turn on autocast and another ability to turn it off. When the hero casts the first ability you take that ability away and replace it with the "turn off" ability so only one ability will be available at a time.

Change the first trigger i gave you to be upon attack instead of spellcast and have a condition to check if the unit has ability "Searing Arrows Autocast OFF". you then need to turn this trigger on using the trigger below and turn it off with another trigger.

  • autocast on
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Searing Arrows Autocast ON
    • Actions
      • Trigger - Turn on (Ability 1)
      • Unit - Remove Searing Arrows Autocast ON from (Triggering unit)
      • Unit - Add Searing Arrows Autocast OFF to (Triggering unit)
If you prefer to use the JASS method you might find this helpful http://www.hiveworkshop.com/forums/jass-resources-412/snippet-autocastorderevent-151064/

does this help?
 
Level 2
Joined
Jan 24, 2012
Messages
28
well, I don't know what you means...
can you create the autocast trigger ?
what's the different between searing arrow on and off ?

Sorry, I'm still newbie about trigger and scripts :(
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
well, I don't know what you means...
can you create the autocast trigger ?
what's the different between searing arrow on and off ?

Sorry, I'm still newbie about trigger and scripts :(

on order string
flammingarrow

off order string
unflammingarrow

whatever dont work the detection if u right click to it

I'm sure it's not too complicated.
i dont know how possible, i thought about detect order (integer) but idk if work

maybe a way if u detect the damage somehow, i mean if u know the unit damage then maybe u can check if dealed damage is higher or no, but this also not too easy i guess
 
Level 7
Joined
Sep 9, 2007
Messages
253
well, I don't know what you means...
can you create the autocast trigger ?
what's the different between searing arrow on and off ?

Sorry, I'm still newbie about trigger and scripts :(


Searing Arrow ON and Searing Arrow OFF are 2 different abilities.... to make it less confusing, Ill call them roar and howl of terror. They are dummy abilities which do nothing. eg.. the night elf abilitiy "roar". change the AOE range to 0 and change the damage increase to 0. This means the ability will effectively do nothing but don't worry we will make ti work with triggers.

Earlier i showed u a trigger to detect when searing arrows is cast. I'll use the same trigger but we will make it happen any time your unit attacks instead of when searing arrows is cast.
make a real variable, I called it: Ability_SEARINGARROWS
  • Ability 1
    • Events
      • Unit - A unit is attacked
    • Conditions
      • Attacking unit = YOUR UNIT
    • Actions
      • Set Ability_SEARINGARROWS = ((Mana of (Attacking unit)) / 100.00)
      • Unit - Set life of (Attacked unit) to ((Life of (Attacked Unit)) - Ability_SEARINGARROWS)
      • Floating Text - Create floating text that reads (String((Integer(Ability_SEARINGARROWS)))) above (Attacked unit) with Z offset 0.00, using font size 10.00, color (80.00%, 10.00%, 10.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 90.00 degrees
The above trigger will work every time your unit attacks, so you need to turn it on and off with 2 more triggers.

Turning it on...
  • autocast on
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar (turn on)
    • Actions
      • Trigger - Turn on (Ability 1)
      • Unit - Remove roar from (Triggering unit)
      • Unit - Add howl of terror to (Triggering unit)
Once you cast the roar spell it will turn on the mana damage trigger at the start. It also replaces the roar (turn on) with the howl of terror (turn off)

Turning it off....
  • autocast on
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to howl of terror (turn off)
    • Actions
      • Trigger - Turn on (Ability 1)
      • Unit - Remove howl of terror from (Triggering unit)
      • Unit - Add roar to (Triggering unit)
As i said in another post, this system only allows autocast, you don't have the single cast option.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
u can use damage detection system but then u must trigger every spell on map, because this way u hurt the target even u missing on target with normal attack (have few ability in game what give chance for miss, evasion, curse etc)

else its good ideea with dummy ability
 
Level 2
Joined
Jan 24, 2012
Messages
28
wow that's works :thumbs_up:
but, why the activate spell doesn't remove from the learning spell ?
and there's some bug about the buff...

try this...
is there anything wrong?
 

Attachments

  • Searing arrow with bonus mana as damage.w3x
    19.8 KB · Views: 55
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
wow that's works :thumbs_up:
but, why the activate spell doesn't remove from the learning spell ?
and there's some bug about the buff...

try this...
is there anything wrong?

its remove :p if u mean to combust mana thing, just learn all level from it :p if i remember that ability got 4 level

only problem is this
when have banshe or unit with evasion and u miss with normal attack but still you hurt with mana, combust or what

but this u can solve a good ability description :D
 

Attachments

  • Searing arrow with bonus mana as damage.w3x
    20.1 KB · Views: 65
Level 2
Joined
Jan 24, 2012
Messages
28
yeah that's right...

I means, after I cast "Activate Combustion", the spell doesn't remove from learning... :(
And the buff sometimes permanent...

Can u fix the trigger? :D
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
ok add/remove ability u must replace with enable/disable ability for player but this result 1player cant have 2 unit with this ability, so only 1 unit can get this combust thing

about buff icon if u remove buff from active then dont show it, i think better if u add a dummy slow aura to unit with ur custom buff if u need the buff icon during it is active
 

Attachments

  • Searing arrow with bonus mana as damage (1).w3x
    20.3 KB · Views: 68
Status
Not open for further replies.
Top