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

Why doesn't my selection trigger work?? Please answere if you see this (+rep)

Status
Not open for further replies.
Level 8
Joined
Aug 21, 2009
Messages
408
Ok. So im making a trigger were if you select a unit it creates one for you.
Here it is:
  • Unit - Siege Engine 0001 <gen> Is selected
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Triggering player) Equal to Player 1 (Red)
      • HasChoseACar[1] Equal to False
    • Then - Actions
      • Unit - Create 1 Siege Engine for Player 1 (Red) at (Center of Create car red <gen>) facing Default building facing degrees
      • Unit - Make (Last created unit) face (Center of face direction red <gen>) over 0.00 seconds
      • Selection - Select (Last created unit) for Player 1 (Red)
      • Set race_car[1] = (Last created unit)
      • Set acceleration[1] = 12
      • Set Handeling[1] = 8
      • Set HasChoseACar[1] = True
      • Camera - Set (Triggering player)'s camera Rotation to (Facing of race_car[1]) over 0.11 seconds
      • Camera - Pan camera for (Triggering player) to (Position of race_car[1]) over 0.11 seconds
      • Sound - Play Rescue <gen>
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to Player 2 (Blue)
          • HasChoseACar[2] Equal to False
        • Then - Actions
          • Unit - Create 1 Siege Engine for Player 2 (Blue) at (Center of Create car blue <gen>) facing Default building facing degrees
          • Unit - Make (Last created unit) face (Center of face direction blue <gen>) over 0.00 seconds
          • Selection - Select (Last created unit) for Player 2 (Blue)
          • Set race_car[2] = (Last created unit)
          • Set acceleration[2] = 12
          • Set Handeling[2] = 8
          • Set HasChoseACar[2] = True
          • Camera - Set (Triggering player)'s camera Rotation to (Facing of race_car[2]) over 0.11 seconds
          • Camera - Pan camera for (Triggering player) to (Position of race_car[2]) over 0.11 seconds
          • Sound - Play Rescue <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering player) Equal to Player 3 (Teal)
              • HasChoseACar[3] Equal to False
            • Then - Actions
              • Unit - Create 1 Siege Engine for Player 3 (Teal) at (Center of Create car teal <gen>) facing Default building facing degrees
              • Unit - Make (Last created unit) face (Center of face direction teal <gen>) over 0.00 seconds
              • Selection - Select (Last created unit) for Player 3 (Teal)
              • Set race_car[3] = (Last created unit)
              • Set acceleration[3] = 12
              • Set Handeling[3] = 8
              • Set HasChoseACar[3] = True
              • Camera - Set (Triggering player)'s camera Rotation to (Facing of race_car[3]) over 0.11 seconds
              • Camera - Pan camera for (Triggering player) to (Position of race_car[3]) over 0.11 seconds
              • Sound - Play Rescue <gen>
            • Else - Actions
Thats the entire trigger
I need help with this:
  • Unit - Siege Engine 0001 <gen> Is selected
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Triggering player) Equal to Player 1 (Red)
      • HasChoseACar[1] Equal to False
    • Then - Actions
      • Unit - Create 1 Siege Engine for Player 1 (Red) at (Center of Create car red <gen>) facing Default building facing degrees
I cant figure out why it isn't working o_O
NOTE: The variable 'HasChoseACar' has already been set to false.
 
Level 8
Joined
Jun 26, 2010
Messages
530
I don't know for sure. It should works. hmm
Try turning off the "(Triggering player) Equal to Player 1 (Red)" just for testing and see if it works. My guess here is that triggering player won't work with "unit is selected". If so, you probably gonna need a script.
 
Level 8
Joined
Aug 21, 2009
Messages
408
I don't know for sure. It should works. hmm
Try turning off the "(Triggering player) Equal to Player 1 (Red)" just for testing and see if it works. My guess here is that triggering player won't work with "unit is selected". If so, you probably gonna need a script.

o damn.... Well Thanks for the quick post xD Apparently i can count on you for help at 1 in the morning :)

+rep As promised

EDIT: lol... i already gave you rep on another post so i cant give you any now :O... I will try again tomorrow xD
 
Level 14
Joined
Aug 30, 2004
Messages
909
Triggering Player should work for a selection event. I've used it.

If you've found that solved your problems I'll chalk it up to a mystery, but if not, you should start disabling the conditions and see when it work...but a "game text: Trigger firing!" would help too. Find out:

1. is the trigger firing? Is there a problem creating the unit? Is the area unpathable or something?
2. Is it the "triggering player" or the other condition that is stopping the trigger?
 
Level 8
Joined
Aug 21, 2009
Messages
408
Triggering Player should work for a selection event. I've used it.

If you've found that solved your problems I'll chalk it up to a mystery, but if not, you should start disabling the conditions and see when it work...but a "game text: Trigger firing!" would help too. Find out:

1. is the trigger firing? Is there a problem creating the unit? Is the area unpathable or something?
2. Is it the "triggering player" or the other condition that is stopping the trigger?

Oddly enough, when i tested it like -SoulBurn told me to (with out the triggering player) it worked... Hmmm Odd? Im going to try again to figure this out, +rep for the help both of you

Edit: I did what darwin said, and put in the game text.. It said Trigger firing(what i typed in) When ever i selected the unit.. So i know its something to do with the "triggering player"
 
Level 8
Joined
Aug 21, 2009
Messages
408
New post:
I looked at an earlier game, like 2 years ago, that i made, and i found the selection event... Here it is, this will probably work just fine :) Thanks anyways guys..

  • Untitled Trigger 003
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Archmage 0005 <gen>
    • Actions
      • Unit - Create 1 Archmage for Player 1 (Red) at (Center of hero appearance <gen>) facing Default building facing degrees
      • Camera - Set Player 1 (Red)'s camera Angle of attack to 310.00 over 3.00 seconds
      • Camera - Set the camera bounds for Player 1 (Red) to (Entire map)
      • Camera - Pan camera for Player 1 (Red) to (Center of hero appearance <gen>) over 3.00 seconds
 
Status
Not open for further replies.
Top