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

Help me how to remove the leak from this ability

Status
Not open for further replies.
Level 8
Joined
Jan 28, 2016
Messages
158
[Events]
[Unit]A unit starts the effect of ability.[/Units]
[/Events]

[Conditions](Ability being cast) Equal to Shockwave1
[/Conditions]

[Actions] For each (Integer A) from 1 - 6, do (Actions)
[Loop Actions]
Wait - 0.03 seconds
Unit - Create a Dummy for (Owner of (Triggering Unit)) facing Default building facing degrees
Unit - Add Shockwave1 to (Last created unit)
Unit - Order (Last created unit) to Orc Tauren Cheiftain - Shockwave (Target point of ability cast)
 
Last edited:
How to Post Triggers

Well you need to save the Locations and remove them after usage.
Secondly your Dummie casters exist after their usage.

Remove the Location Leaks.
  • Set Loc = (Position of (Triggering unit))
  • Set Loc2 = (Target point of ability being cast)
  • -------- your Actions --------
  • Custom script: call RemoveLocation(udg_Loc)
  • Custom script: call RemoveLocation(udg_Loc2)
This will kill your Dummie casters after a short delay, change the Cast Point of the dummie in Object Editor or the expiration timer to achive the desired effect.
  • Unit - Add a 0.60 second Standard expiration timer to (Last created unit)
Edit: Might be a good Idea to exclude your Dummie casters from Triggering this Trigger again. To avoid endless Shockwave-Casts, or built it around this retriggering.
 
Level 8
Joined
Jan 28, 2016
Messages
158
Untitled Trigger 003
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shackwave
Actions
Set CasLoc = (Position of (Triggering unit))
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Wait 0.03 seconds
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at CasLoc facing Default building facing degrees
Unit - Add Shackwave to (Last created unit)
Set LocOffset[(Integer A)] = (Target point of ability being cast)
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave LocOffset[(Integer A)]
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_LocOffset[bj_forLoopAIndex])
Custom script: call RemoveLocation(udg_CasLoc)


But the shockwave is still unkillable...
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You should try to avoid waits in spells to achieve MUI. Especially in loops waits do not work properly.
 
Level 11
Joined
May 16, 2016
Messages
730
[Events]
[Unit]A unit starts the effect of ability.[/Units]
[/Events]

[Conditions](Ability being cast) Equal to Shockwave1
[/Conditions]

[Actions] For each (Integer A) from 1 - 6, do (Actions)
[Loop Actions]
Wait - 0.03 seconds
Unit - Create a Dummy for (Owner of (Triggering Unit)) facing Default building facing degrees
Unit - Add Shockwave1 to (Last created unit)
Unit - Order (Last created unit) to Orc Tauren Cheiftain - Shockwave (Target point of ability cast)
Interval of shockwaves and number of shockwaves you can set in the USE ability. This template is MUI.
 

Attachments

  • SHOCKWAVE.w3x
    20.7 KB · Views: 31
Untitled Trigger 003
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shackwave
Actions
Set CasLoc = (Position of (Triggering unit))
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Wait 0.03 seconds
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at CasLoc facing Default building facing degrees
Unit - Add Shackwave to (Last created unit)
Set LocOffset[(Integer A)] = (Target point of ability being cast)
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave LocOffset[(Integer A)]
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_LocOffset[bj_forLoopAIndex])
Custom script: call RemoveLocation(udg_CasLoc)


But the shockwave is still unkillable...
What you mean with unkillable.
If you mean that it does not stop -> Than you have to exclude your Dummie Caster Unit-Type from Triggering this again.
For example:
  • Conditions
    • (Ability being cast) Equal Shockwave
    • ((Triggering unit) is a Hero) Equal True
So only Heroes would create sub-Shockwaves.
 
Status
Not open for further replies.
Top