Need help optimizing my trigger! - [ Crushing Wave + Fireboltl casting dummies ]

neo34rd

New Member
Reaction score
3
Hi guys I'm making a "crushing wave" spell that stuns all targets that it hits.
Currently the base spell for "Crushing Wave" is "Breath of Frost" this is to place my "stun this unit" buff onto the unit to cast Firebolt on. The dummy has firebolt (nodamageversion) on it to save time.

I need help optimizing my trigger and to check if its MUI. Any help would be greatly appreciated!!

Here is the trigger:
Code:
[Trigger - Crushing Wave (With Stun)]

 - Events
        Unit - A unit starts an effect of an ability

 - Conditions
        (Ability being cast) Equal to Crushing Wave (With Stun)

 - Actions
        For each (Integer A) from 1 to 3, do (Actions)
            - Loop - Actions
               - Wait 0.10 seconds
               - Unit Group - (Pick every unit in playable map area) matching ( Matching unit has buff (Stun me!(Cause:Crushingwave)) equal to true ) and do Actions
                    - Unit - Remove buff (Stun me!(Cause:Crushingwave))
                    - Unit - Create 1 dummy(fireball) for (Owner of triggering unit) at (Position of (picked unit)) facing default
                    - Unit - Order (Last created Unit) to Neutral - Firebolt (Picked unit)
                    - Unit - Add a 2.00 second Generic expiration timer to (Last created unit)


Things to note:
- Fireball deals no damage, has no manacost or cooldown.
- Dummy units have over 9000 Max and Init Mana and regen!! ( OVER 9000! )
- Dummy units have no cast backswing.
- I know that the (Units in playable map area) in kinda wrong but I cant seem to create cone shaped regions or that kinda stuff..

PS: Also I tried making 1 dummy cast all the firebolts but for some reason it would only cast it on some of the affected units (Even w/o adding the generic expiration timer on the dummy unit) Can any1 explain this?

PSS: The wait 0.10 second is essential as when the trigger fires off sometimes the targets have not been hit by the CrushingWave yet. If theres another way to detect when the spell hits please inform me XD



Thanks again in advance!




EDIT: Btw does anyone know how to post those triggers which the icons and all? Not as code or a image but as a post kinda like what I have seen around these forums so far?
 

Dirac

22710180
Reaction score
147
Instead of that aweful way you use to detect units with the crushing wave buff do the following:

Event - Unit Takes Damage (for this kind of event you'll need a GUI damage system, search through the forums)
Condition - Unit has the buff
Actions - Remove the buff and stun the unit.

No need for waits, unit groups (which leak same way as locations) or loops.
 

neo34rd

New Member
Reaction score
3
OHHHH! Almost forgot that I could do that with damage detection... Thanks!! +REP

Btw does any1 know how to post triggers? Typing all that code was kinda time consuming.
 

Dirac

22710180
Reaction score
147
Use right click on the file icon above the events on the trigger and have it "Copy as text". To post it as GUI use [noparse]
Trigger:
[/noparse]
And you give rep by clicking the star-like button on the lower left part of the post.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top