- Joined
- Feb 22, 2025
- Messages
- 78
Hi yall so,
I'm trying to create a spell that triggers whenever a unit notices a target. Basically, the spell is supposed to be Withering fire from HOTS.
-I created a Point variable- Random point in region centered at position of the caster with size 4x4
-Withering fire dummy Array 5
-Withering fire group Units within 800 of position of the Caster matching xzyblah every 0.01 secs
* Posting the triggers and the in-game effect( don't judge pelase xd)
----------------------------------------------------------------------------------------------------------------------
Since I'm kinda new to coding and I'm postponing learning Jass :") I need help with a few things:
1. How can I make dummies spawn at an interval in the loop cuz they (all 5 of them) spawn at the same time at the same point. Basically, I want them to spawn in a 0.6 s interval at random points around the caster in the variable I've set recently so it would be pleasing to the eye - cuz their experation timer is 0.6 seconds.
2. Can someone check this for leakage also :")
I'm trying to create a spell that triggers whenever a unit notices a target. Basically, the spell is supposed to be Withering fire from HOTS.
-I created a Point variable- Random point in region centered at position of the caster with size 4x4
-Withering fire dummy Array 5
-Withering fire group Units within 800 of position of the Caster matching xzyblah every 0.01 secs
* Posting the triggers and the in-game effect( don't judge pelase xd)
----------------------------------------------------------------------------------------------------------------------
-
WithFireGroup
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet WithFire_Group = (Units within 800.00 of (Position of Sylvanas 0020 <gen>) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Sylvanas 0020 <gen>).) Equal to True)
-
-
-
RandomPoint
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet WithFire_Point = (Random point in (Region centered at (Position of Sylvanas 0020 <gen>) with size (4.00, 4.00)))
-
-
-
WithFireDmg
-
Events
-
Unit - Sylvanas 0020 <gen> Notices a target in range
-
-
Conditions
-
(Sylvanas 0020 <gen> is alive) Equal to True
-
((This trigger) is on) Equal to True
-
(WithFire_Group is empty) Equal to False
-
-
Actions
-
Trigger - Turn off (This trigger)
-
Special Effect - Create a special effect attached to the origin of WithFire_Caster using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
-
Set VariableSet WithFire_Caster = (Triggering unit)
-
Special Effect - Destroy (Last created special effect)
-
Unit Group - Pick every unit in WithFire_Group and do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Withering Fire for (Owner of (Triggering unit)) at WithFire_Point facing (Position of (Random unit from WithFire_Group))
-
Set VariableSet WithFire[(Integer A)] = (Last created unit)
-
Special Effect - Create a special effect attached to the chest of WithFire[(Integer A)] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
-
Unit - Add Firebolt (Neutral Hostile) to WithFire[(Integer A)]
-
Unit - Order WithFire[(Integer A)] to Neutral - Firebolt (Random unit from WithFire_Group)
-
-
-
For each (Integer A) from 1 to 5, do (Actions)
-
Loop - Actions
-
Unit - Add a 0.60 second Generic expiration timer to WithFire[(Integer A)]
-
-
-
-
-
-
-
Wait 0.60 seconds
-
Custom script: call DestroyGroup(udg_WithFire_Group)
-
Trigger - Turn on (This trigger)
-
-
-
WithFireremove
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(WithFire[(Integer A)] is dead) Equal to True
-
-
Actions
-
Set VariableSet WithFire_dummydied = (Triggering unit)
-
Unit - Remove (Triggering unit) from the game
-
-
Since I'm kinda new to coding and I'm postponing learning Jass :") I need help with a few things:
1. How can I make dummies spawn at an interval in the loop cuz they (all 5 of them) spawn at the same time at the same point. Basically, I want them to spawn in a 0.6 s interval at random points around the caster in the variable I've set recently so it would be pleasing to the eye - cuz their experation timer is 0.6 seconds.
2. Can someone check this for leakage also :")
Last edited: