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

Frostbolt Stat-based Spell

Status
Not open for further replies.
Level 4
Joined
Jan 8, 2012
Messages
66
Hello, I need help working on a Frostbolt spell that will function like this:

Deal damage (intellect x2 + 60) to target when the projectile reaches it. Once the projectile hits it, slow movement/attack speed by 30% for 3 seconds.

Thanks in advance!
 
Level 25
Joined
May 11, 2007
Messages
4,650
Either use a Damage-Detection System that detects when your missile hits your enemy unit.

Or create a tempunit that is told to attack once the targeted unit, which you add a spell with damage bonus on it according to the level of your intelligence.

So lvl 1 damage bonus: 62
lvl 2: 64
lvl 3: 66
etc
 
Level 10
Joined
Jun 6, 2007
Messages
392
Create a dummy ability based on slow and dummy unit (unit with locust and no collision or enabled attacks). You won't need a damage detection system, you can use something like

Events
Unit starts the effect of an ability
Conditions
Ability being cast is equal to frostbolt
Actions
Cause triggering unit to damage target unit of ability being cast...
Create dummy unit at caster's location
hide dummy
add expiration timer to dummy
add dummy ability to dummy
order dummy unit to human priestess-slow on target unit
 
Level 6
Joined
Jun 20, 2012
Messages
195
Cause triggering unit to damage target unit of ability being cast...
Create dummy unit at caster's location
hide dummy
add expiration timer to dummy
add dummy ability to dummy
order dummy unit to human priestess-slow on target unit

in additon, before doing this stuff, you will need to check first the distance between your projectile and the target via periodic trigger.
 
Level 10
Joined
Jun 6, 2007
Messages
392
Ahh, you're right. I thought the event would fire when the missile hits, not when it is launched, but I was wrong. Then the best method would be to use damage detection, and base the spell on some spell with a buff (acid bomb with 0 area should do the trick). So it's like

Events
Damage event becomes equal to 1.00
Conditions
DamageEventTarget has YOUR_BUFF equal to true
Actions
Remove YOUR_BUFF from DamageEventTarget
turn off DamageEventTrigger
Cause DamageEventSource to damage DamageEventTarget...
turn on DamageEventTrigger
Create dummy unit at caster's location
hide dummy
add expiration timer to dummy
add dummy ability to dummy
order dummy unit to human priestess-slow on target unit
 
Status
Not open for further replies.
Top