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

Triggered Spell Issue

Status
Not open for further replies.
Level 2
Joined
Dec 7, 2005
Messages
16
I'm making a spell, that's suposed to cast Inferno on every unit within 800 of the caster. The issue is that the spell creates about 20 Infernals instead of just one for each unit. I've tried several things to fix this, and I can't figure it out.

Here's my triggering:

Inferno Storm
Events:
Unit - A unit finishes casting an ability
Conditions:
(Ability Being cast) Equal to Inferno Storm
(Level of Inferno Storm for (Casting unit)) Equal to 1
Events:
Pick every unit in (Units within 800.00 of (Position of (Triggering unit)) matching ((Owner of (Picked Unit)) Not equal to (Owner of (Triggering unit))) and do (Actions)
Loop - Actions
Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing degrees
Add a 1.5 second Generic expiration timer to (Last created unit)
Add Inferno to (Last created unit)
Order (Last created unit) to Undead Dreadlord - Inferno (Position of (Picked unit))




I was hoping sombody could possibly shed some light on this problem
 
Level 6
Joined
Sep 17, 2005
Messages
276
i dont know if that will solve your problem but try following:

-in event take "starts casting an ability" fnct
-replace "triggering unit" with "casting unit"
-delete the expiration timer and remove the unit at end of trigger

beside that you could make the points a variable - this will avoid leakings. or try giving the dummy in object editor the ability so you dont have to add it via trigger....

Events:
Unit - A unit starts casting an ability
Conditions:
(Ability Being cast) Equal to Inferno Storm
(Level of Inferno Storm for (Casting unit)) Equal to 1
Actions:
Pick every unit in (Units within 800.00 of (Position of (Casting unit)) matching ((Owner of (Picked Unit)) Not equal to (Owner of (Casting unit))) and do (Actions)
Loop - Actions
set PosTarget to position of (picked unit)
Create 1 Dummy for (Owner of (Casting unit)) at (PosTarget) facing Default building facing degrees
Add Inferno to (Last created unit)
Order (Last created unit) to Undead Dreadlord - Inferno (PosTarget))
Remove (last created unit) from the game

this hopefully helps you... :?
 
Status
Not open for further replies.
Top