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

[Trigger] I Need Help

Status
Not open for further replies.
Level 2
Joined
May 23, 2008
Messages
20
Okay here's my problem: I can't get 4 of my triggers to work. I'm trying to get Circles of power to change ownership when a units walks over them. I think I used the connect the triggers right but I don't know.

Here's one of my triggers. Tell me what I did wrong or left out. Yes the triggers are enabled and initially on.


  • SE Control Point
    • Events
      • Unit - A unit enters SE Control Point <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
      • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
      • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
      • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
      • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
      • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
    • Actions
      • Unit - Change ownership of Circle of Power (large) 0008 <gen> to (Matching player) and Change color
 
Last edited by a moderator:
  • SE Control Point
    • Events
      • Unit - A unit enters SE Control Point <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Entering unit)) Equal to Player 1 (Red)
          • (Owner of (Entering unit)) Equal to Player 2 (Blue)
          • (Owner of (Entering unit)) Equal to Player 3 (Teal)
          • (Owner of (Entering unit)) Equal to Player 4 (Purple)
          • (Owner of (Entering unit)) Equal to Player 5 (Yellow)
          • (Owner of (Entering unit)) Equal to Player 6 (Orange)
    • Actions
      • Unit - Change ownership of Circle of Power (large) 0008 <gen> to (Owner of (Entering unit)) and Change color
And that, kind sir is how your trigger is suppose to look like. I'm positive it will work because I'm too lazy test it in-game, but if it works, your welcome. :D
 
Level 2
Joined
May 23, 2008
Messages
20
still don't work onisaiyan808. I like the help everyone. But onix_noob I don't understand what you mean by "make at actions to be owner of triggering unit" Maybe because I'm still learning to use triggers properly.
 
Last edited:
I think onix_noob means that your trigger is suppose to be like this:
  • SE Control Point
  • Events
  • Unit - A unit enters SE Control Point <gen>
  • Conditions
  • Actions
  • Unit - Change ownership of Circle of Power (large) 0008 <gen> to (Owner of (Triggering unit)) and Change color
He meant to take away the conditions and change the Matching Player to Owner of Triggering Unit.
 
Level 2
Joined
May 23, 2008
Messages
20
Now I have another problem. How do you make a player win if they own all 4 circles of power. (I'm still learning)
 
Now I have another problem. How do you make a player win if they own all 4 circles of power. (I'm still learning)

That requires Player variables and boolean variables to work. Since there's 4 circles of power, you need a Player and boolean variable for each of them. Set those booleans to false.

  • SE Initialization
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set SE_CircleOfPower_1 = False
      • Set SE_CircleOfPower_2 = False
      • Set SE_CircleOfPower_3 = False
      • Set SE_CircleOfPower_4 = False
Make one trigger for each circle of power each time someone enters the circle once and the second time to remove control from the player.

  • Unit enters SE Control Point (Circle of Power # here)
    • Events
      • Unit - A unit enters SE Control Point (Circle of Power # here) <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SE_CircleOfPower_(Circle of Power # here) = False
        • Then - Actions
          • Set SE_CircleOfPower_(Circle of Power # here) = True
          • Set SE_Player_(Circle of Power # here) = (Owner of (Triggering unit))
          • Unit - Change ownership of Circle of Power (large) 0008 <gen> to SE_Player_(Circle of Power # here) and Change color
        • Else - Actions
          • Set SE_CircleOfPower_(Circle of Power # here) = False
          • Set SE_Player_(Circle of Power # here) = Neutral Passive
          • Unit - Change ownership of Circle of Power (large) 0008 <gen> to SE_Player_(Circle of Power # here) and Change color
After someone owns all 4 circle of powers, make another trigger to trigger the game to end, making whoever controls all 4 circle of powers win.

  • SE Initialization
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Wait until (((SE_CircleOfPower_1 Equal to True) and (SE_CircleOfPower_2 Equal to True)) and ((SE_CircleOfPower_3 Equal to True) and (SE_CircleOfPower_4 Equal to True))), checking every 1.00 seconds
......................... I don't know the rest. Sorry, maybe someone else can help you. :(
 
Level 2
Joined
May 23, 2008
Messages
20
I... uhhh... I don't really know how to do that. I can't find the action that has anything to do with [Set SE_Circle of Power_# = False]
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Use an array...

And that implementation is horrible anyways.

  • Capture CoP
    • Events
      • -------- Event for capturing a circle of power --------
    • Conditions
      • -------- Conditions for capturing a circle of power --------
    • Actions
      • -------- Pass Circle of Power --------
      • Custom script: set bj_wantDestroyGroup = true
      • If (All Conditions are True) Then do (Then actions) Else do (Else actions)
        • If - Conditions
          • (Number of Units in (Units owned by (<capturing player>) of type Circle of Power)) Equal to <number required to win>
        • Then - Actions
          • -------- Victory stuff --------
        • Else - Actions
 
Level 2
Joined
May 23, 2008
Messages
20
Sorry for all the trouble but my computer crashed during a blackout and I lost all my progress for that map. I'm creating yet another map. Meant to be based off Call of Duty 4 Modern Warfare Online.
 
Status
Not open for further replies.
Top