• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger Problems

Status
Not open for further replies.
Level 11
Joined
Aug 16, 2007
Messages
847
This might take a little while. What I want is that when this ability "Board Ship" is cast I want units to be created at a certain point, and I want those units to correspond with items in their inventory

  • Boarding
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Board Ship
    • Actions
      • Unit - Make (Triggering unit) Invulnerable
      • Unit - Pause (Triggering unit)
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • Unit - Pause (Target unit of ability being cast)
      • If ((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Warriors) then do (If ((Owner of Barrel 0066 <gen>) Equal to (Triggering player)) then do (Unit - Create 5 Militia for (Triggering player) at (Random point in Attacker Start 06 <gen>) facing (Random point in Defender 6 Rear Start <gen>)) else do (Do nothing)) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item carried by (Target unit of ability being cast) in slot 1)) Equal to Basic Crew
        • Then - Actions
          • Player Group - Pick every player in (All players matching ((Owner of (Target unit of ability being cast)) Equal to (Owner of (Target unit of ability being cast)))) and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 1 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 2 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 3 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 4 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 5 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 6 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 7 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 3 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start Main <gen>) facing (Random point in Attacker Start 06 <gen>)
        • Else - Actions
          • Do nothing
yeah, so if anyone knows how I can make this really big trigger work, that would be helpful :smile:
 
First of, always use "Starts the effect of an ability" as your event, not "Starts casting an ability".

You can't use "Triggering Player" here, since there's none. Use "Owner of Triggering Unit".

The "Do Nothing" action is useless. Don't use them.

The Player Group trigger is wrong, you don't need the "Player Group" thing. Just have the "Unit - Create..." there.

See if this makes it work.
 
Level 11
Joined
Aug 16, 2007
Messages
847
Okay I've tried your suggestions and made some modifications of my own yet, I've only had semi-success, units spawn for the Attacker (triggering player), but they aren't spawning for the targetng player. Here is what the trigger now looks like:

  • Boarding
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Board Ship
    • Actions
      • If ((Owner of Barrel 0066 <gen>) Equal to Neutral Passive) then do (Unit - Change ownership of Barrel 0066 <gen> to (Triggering player) and Change color) else do (Do nothing)
      • Unit - Make (Triggering unit) Invulnerable
      • Unit - Pause (Triggering unit)
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • Unit - Pause (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of Barrel 0066 <gen>) Equal to (Owner of (Triggering unit))
        • Then - Actions
          • If ((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Imperial Warriors) then do (Unit - Create 5 Imperial Warrior for (Owner of (Triggering unit)) at (Random point in Attacker Start 06 <gen>) facing (Random point in Defender 6 Rear Start <gen>)) else do (Do nothing)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Target unit of ability being cast) in slot 1)) Equal to Basic Crew
            • Then - Actions
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 1 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 2 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 3 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 4 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 5 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 6 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 1 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start 7 <gen>) facing (Random point in Attacker Start 06 <gen>)
              • Unit - Create 3 Peasant for (Owner of (Target unit of ability being cast)) at (Random point in Defender 6 Crew Start Main <gen>) facing (Random point in Attacker Start 06 <gen>)
            • Else - Actions
              • Do nothing
        • Else - Actions
          • Do nothing
As for the "Do Nothing" those are just place holder I mean to add more stuff to the trigger but it wont be consequential as it will be identical to the stuff I have now except with some minor changes like what is spawning and what slot is being checked or what barrel, etc.
 
Well, you're certain he carries the item in his first inventory-slot?
Anyway, you should add this:
  • Boarding
    • Events
      • "Your Event"
    • Conditions
      • "Your Conditions"
    • Actions
      • "Your Actions"
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • "Your Conditions"
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Item-type of (Item carried by (Target unit of ability being cast) in slot 1)) Equal to Basic Crew
                  • (Item-type of (Item carried by (Target unit of ability being cast) in slot 2)) Equal to Basic Crew
                  • (Item-type of (Item carried by (Target unit of ability being cast) in slot 3)) Equal to Basic Crew
                  • (Item-type of (Item carried by (Target unit of ability being cast) in slot 4)) Equal to Basic Crew
                  • (Item-type of (Item carried by (Target unit of ability being cast) in slot 5)) Equal to Basic Crew
                  • (Item-type of (Item carried by (Target unit of ability being cast) in slot 6)) Equal to Basic Crew
            • Then - Actions
              • "Your Actions"
            • Else - Actions
        • Else - Actions
 
Status
Not open for further replies.
Top