• 🏆 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!

Please help with spawning spell

Status
Not open for further replies.
Level 3
Joined
Apr 17, 2008
Messages
44
I want to make a spell, similar to dark arrow, that spawns a unit from a killed one. Except in this case I don't want to make it a spell that autocasts, I want to make it an ability that has a percentage of happening, like has a 15% chance to spawn unit x from killed unit.

Is there a way I can do this without triggers? and if not, how do I do it with triggers?

I know this same thread is up already but I accidently posted it as solved last time
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Describe exactly what this spell must do?

If its basically a target spell with % chance to spawn on death, then use triggers to deal the damage. If the damage was fatal (unit is dead after dealing damage) then do your random % statment (if random integer between 0 and 99 < 15) and if that passes then create a minion, if not then do nothing.

That is if the spell you want deals a large sum of damage and on killing does that. If you mean the unit is cursed for X seconds with that curse to spawn a minion on death, then something else is needed.

Like I said, you need to be more clear as dark arrow does not spawn a unit from a killed one, it spawns a unit from a unit that dies to it.
 
Level 12
Joined
Dec 10, 2008
Messages
850
I think this is what you want, I didnt test it, but it should work. Just take the ability Sphere, change its values, give it some icons, and set the Buff field to Black Arrow. It should work, if it doesn't ,tell me and I'll figure out why.

  • Dark Arrow
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Black Arrow) Equal to True
    • Actions
      • Set ArrowChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ArrowChance Less than or equal to 15
        • Then - Actions
          • Set UnitLoc = (Position of (Attacked unit))
          • Unit - Create 1 Footman for (Owner of (Attacking unit)) at UnitLoc facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_UnitLoc)
        • Else - Actions
      • Set ArrowChance = 0
Hopefully it works, I'll keep the trigger around just incase.
 
Status
Not open for further replies.
Top