• 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 help

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2007
Messages
244
Well im making a hero arena map and i was doing the pikmin hero(olimar) and i did the pikmin and tried to do a spell that when i cast it brings all pikmin to olimar position heres my trigger.+rep if you help me.


call pikmins
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Call Pikmin
(Unit-type of (Target unit of ability being cast)) Equal to Yellow Pikmin
(Unit-type of (Target unit of ability being cast)) Equal to Red Pikmin
(Unit-type of (Target unit of ability being cast)) Equal to Blue Pikmin
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Move (Target unit of ability being cast) instantly to (Position of (Triggering unit)))
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Move (Target unit of ability being cast) instantly to (Position of (Triggering unit)))
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Move (Target unit of ability being cast) instantly to (Position of (Triggering unit)))
 
Level 3
Joined
Jul 9, 2006
Messages
23
Things in <> means you stick your own variable in there. I believe it leaks, bit tired atm but it should work.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <My Ability>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of issued order)) Equal to <Pikmin 1>
        • Then - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 1>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Target unit of issued order)) Equal to <Pikmin 2>
            • Then - Actions
              • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 2>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Target unit of issued order)) Equal to <Pikmin 3>
                • Then - Actions
                  • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 3>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))
                • Else - Actions
      • Custom script: call RemoveLocation(udg<Location Of Olimar>)
 
Level 5
Joined
Apr 13, 2008
Messages
106
Things in <> means you stick your own variable in there. I believe it leaks, bit tired atm but it should work.

Untitled Trigger 001

Events

Unit - A unit Starts the effect of an ability

Conditions

(Ability being cast) Equal to <My Ability>

Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions

(Unit-type of (Target unit of issued order)) Equal to <Pikmin 1>

Then - Actions

Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 1>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))

Else - Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions

(Unit-type of (Target unit of issued order)) Equal to <Pikmin 2>

Then - Actions

Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 2>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))

Else - Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions

(Unit-type of (Target unit of issued order)) Equal to <Pikmin 3>

Then - Actions

Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 3>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))

Else - Actions

Custom script: call RemoveLocation(udg<Location Of Olimar>)

Id check what you did it looks like what he did was good but maybe you could have goofed these are triggers one slight error on any1s part fault or not can cause who knows what kind of things
 
Level 7
Joined
Nov 13, 2007
Messages
244
1.Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to <Pikmin 1>)) and do (Unit - Move (Matching unit) instantly to (<Location Of Olimar>))

i did not found this trigger.
(not the part of olimar)

2. I did not understand this

Custom script: call RemoveLocation(udg<Location Of Olimar>)
 
Level 5
Joined
Apr 13, 2008
Messages
106
do you know where that custom script goes?? it goes in the trigger editor. Click on the Map name and put the custom script in the box at the right. then try it. The custom script wont make sense to you but World Editor knows exactly what it means.

Also to find that trigger go in the trigger editor its like this Unit group- pick every unit in (Playable map area) now you click the "link and then get another window where you click the drop down menu and find matching ((Unit-type of (Picked unit)) Equal to (your unit) and do (Unit - move (matching unit) instantly to olimar now i imagine that its gonna be more like location of triggering unit which you click on that and pick your unit and then it should be fine. I hope i expanded on this better
 
Status
Not open for further replies.
Top