Some Simple Trigger Help

Lghtofthmoon

New Member
Reaction score
0
So I'm trying must first Trigger Enhanced Ability. The Hero is supposed to summon some banshees that instantly posess all nearby non-player units. The banshees get summoned but that's it. The entire second trigger won't work. Any ideas? Thanks in advance!

Trigger:
  • Casting PoS
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Procession of Souls
    • Actions
      • Set Hostileunits = (Units within 600.00 of CasLoc matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Set CasLoc = (Position of (Casting unit))
      • Set Numberofhostiles = (Number of units in (Units within 600.00 of CasLoc matching ((Owner of (Matching unit)) Not equal to Player 1 (Red))))
      • Special Effect - Create a special effect at CasLoc using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
      • Sound - Play PossessionMissileLaunch1 <gen> at 100.00% volume, located at CasLoc with Z offset 0.00
      • Unit - Create Numberofhostiles Dummy Banshee for Player 1 (Red) at CasLoc facing Default building facing degrees
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Dummy Banshee) and do (Unit - Order (Picked unit) to Undead Banshee - Possession (Random unit from Hostileunits))
      • Special Effect - Destroy (Last created special effect)


And the the precast tirgger...

Trigger:
  • Precast PoS
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Procession of Souls
    • Actions
      • Set Hostileunits = (Units within 600.00 of CasLoc matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Sound - Play SleepBirth1 <gen> at 100.00% volume, located at CasLoc with Z offset 0.00
      • Unit Group - Pick every unit in Hostileunits and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\CreepSleep\CreepSleepTarget.mdl
          • Wait 4.75 seconds
          • Special Effect - Destroy (Last created special effect)
          • Wait 1.00 seconds
          • Unit - Unpause (Picked unit)
 

unknown666

New Member
Reaction score
5
I think your problem is that when you cast it both of the triggers are running at once.

And your Precast doesn't have the location set.

also add a custom script which will remove your your "CasLoc" to make it leak-free
 

Angel_Island

Much long, many time, wow
Reaction score
56
That was what i thought too and that is why you should add a "Wait 0.01 seconds" in the second trigger.
 

Lghtofthmoon

New Member
Reaction score
0
Begins casting and starts the effect of an ability are different. This spell has a 5 second cast time. And what do I need set:Casloc=position of caster for in the second trigger?
 

unknown666

New Member
Reaction score
5
Make it like this

Assuming your your CasLoc is a Region variable

Trigger:
  • Casting PoS
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Procession of Souls
    • Actions
      • Set Hostileunits = (Units within 600.00 of CasLoc matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Set CasLoc = (Position of (Casting unit))
      • Set Numberofhostiles = (Number of units in (Units within 600.00 of CasLoc matching ((Owner of (Matching unit)) Not equal to Player 1 (Red))))
      • Special Effect - Create a special effect at CasLoc using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
      • Sound - Play PossessionMissileLaunch1 <gen> at 100.00% volume, located at CasLoc with Z offset 0.00
      • Unit - Create Numberofhostiles Dummy Banshee for Player 1 (Red) at CasLoc facing Default building facing degrees
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Dummy Banshee) and do (Unit - Order (Picked unit) to Undead Banshee - Possession (Random unit from Hostileunits))
      • Special Effect - Destroy (Last created special effect)
      • Custom Trigger: call RemoveRect (udg_CasLoc)


Thats for the first trigger and this for the second

Trigger:
  • Precast PoS
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Procession of Souls
    • Actions
      • Wait 0,01 seconds #<--- try it out
      • Set Hostileunits = (Units within 600.00 of CasLoc matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Sound - Play SleepBirth1 <gen> at 100.00% volume, located at CasLoc with Z offset 0.00
      • Custom Script: call RemoveRect (udg_CasLoc)
      • Unit Group - Pick every unit in Hostileunits and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\CreepSleep\CreepSleepTarget.mdl
          • Wait 4.75 seconds
          • Special Effect - Destroy (Last created special effect)
          • Wait 1.00 seconds
          • Unit - Unpause (Picked unit)


If your CasLoc is a Point, change RemoveRect to RemoveLocation
 

Lghtofthmoon

New Member
Reaction score
0
Ok but now I get the error: Expected a code statement. And the CasLoc is a point. I would never use regions >.<

EDIT: I tried the Wait 0.01 seconds. Like I said the two triggers fire at different times. So, nothing changed.
 

Lghtofthmoon

New Member
Reaction score
0
Oops I entered the custom script as Custom Script: "Custom Script:..." lol

But really, nothing has changed. Any other ideas?
 

unknown666

New Member
Reaction score
5
Try to uncheck the [X] initially on option.

And add a trigger that runs the trigger Precast PoS checking conditions
 

unknown666

New Member
Reaction score
5
At your PreCast PoS trigger uncheck this option

Initially.jpg


Then in your Casting PoS try to add this trigger

Trigger:
  • Trigger - Run Precast PoS &lt;gen&gt; (checking conditions)


At the end of the trigger, it might work
 

unknown666

New Member
Reaction score
5
Then do the stuff I mentioned to your "Cast PoS"

Initially.jpg

Turn this off

Trigger:
  • Trigger - Run Cast PoS &lt;gen&gt; (checking conditions)
 

Lghtofthmoon

New Member
Reaction score
0
But where can I put that trigger? If I put it under Casting PoS then it won't fire until after the effect has started, which is 5 seconds after when the spell begins casting.
 

Lghtofthmoon

New Member
Reaction score
0
Pretty positive. Like I've said, these two events fire at different times. One at the start of casting and one at the start of the effect.
 
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