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

Status
Not open for further replies.
Level 3
Joined
Aug 31, 2005
Messages
29
ok i need to know why these trigs keep closing my wc3... please take the time to look through these and reply to me.

note: when i disable trigger WO2 the game doesn't close but i can'y find the damn problem.
 

Attachments

  • Trig.zip
    4.9 KB · Views: 47
Last edited:
Level 5
Joined
Nov 14, 2004
Messages
159
in your Captain trigger, this line:

  • If ((H slot status) Not equal to Is playing) then do (Trigger - Run (This trigger) (checking conditions)) else do (Trigger - Run Zerg <gen> (checking conditions))
is causing crash / closing because you are using "Run (This trigger)"
 
Level 3
Joined
Aug 31, 2005
Messages
29
then how can i make it so i can loop that same trigger everytime that condition isn't true or is or w/e...
 
Level 3
Joined
Aug 31, 2005
Messages
29
that doesn't work, the map i am using this trigger for is like a zerg infestation map. it randomly selects a player to be the captain and if the player it chooses happens to be not playing then it has to reselect a another random player and keeps doing this untill it chooses a player that is playing.
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
If you want to find the first human player starting from player1, use this trigger: (game_host is integer variable, default 1)

  • trigger01
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(Game_Host)) controller) Equal to User
          • ((Player(Game_Host)) slot status) Equal to Is playing
        • Then - Actions
          • Trigger - Run your trigger <gen> (checking conditions)
          • Skip remaining actions
        • Else - Actions
          • Set Game_Host = (Game_Host + 1)
          • Trigger - Run (This trigger) (ignoring conditions)
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Thats good to know.....I guess you already solved your problem then, or do you want me to post a random trigger and you tell me again if it works for you or not? (hint: give more info of your problem and what you excacly want!)
 
Level 3
Joined
Aug 31, 2005
Messages
29
Read post number 5. If you already have then read it again, I don't think you understood my problem...
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
So instead of the first player in line you want a random player? The trigger I already gave you requires only one change.

  • trigger01
  • Events
  • Time - Elapsed game time is 1.00 seconds
  • Conditions
  • Actions
  • Set Game_Host = (Random integer from 1 to 12)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Player(Game_Host)) controller) Equal to User
  • ((Player(Game_Host)) slot status) Equal to Is playing
  • Then - Actions
  • Trigger - Run your trigger <gen> (checking conditions)
  • Skip remaining actions
  • Else - Actions
  • Trigger - Run (This trigger) (ignoring conditions)
 
Level 3
Joined
Aug 31, 2005
Messages
29
but thats basically what i got except i have more conditions for most of them. Do i really need that skip remaining actions? It should do those anyways if the conditions are true. i need that same trigger for 10 players. this seems to work on single plaer but with more than 1 player on and it closes.
 
Level 11
Joined
Jul 12, 2005
Messages
764
Try this one:

  • trigger01
  • Events
  • Time - Elapsed game time is 1.00 seconds
  • Conditions
  • Actions
  • Custom script - loop
  • Custom script - exitwhen udg_Captain != null
  • Set Game_Host = (Random integer from 1 to 12)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Player(Game_Host)) controller) Equal to User
  • ((Player(Game_Host)) slot status) Equal to Is playing
  • Then - Actions
  • Set Captain = (Player(Game_Host)
  • Else - Actions
  • Custom script - endloop
It uses 3 lines of JASS, not that hard. 'Captain' is a player variable.

But i have a question: Do you want the captain to be chosed in the beginning of the game, or you want it to be "rechosed" when the player leaves? Because then the event would be 'Every 1 seconds of the game'...
 
Level 3
Joined
Aug 31, 2005
Messages
29
have you guys ever played zerg infestation? i want to make a map like that, it has 3 ranks: NCO, WO, and captain.

Captain: when captain is chosen for a player, that player must be playing or it has to rechoose (if captain leaves or dies then there is no new captain unless someone picks up the badge).

WO and NCO: when these 2 ranks are chosen they cannot be asigned to the captain, 2 players can't have 2 ranks. there is WO1, WO2, WO3, WO4, NCO1, NCO2, NCO3, NCO4, and NCO5. a player cannot be chosen as WO1 and WO2 at same time, same goes for NCOs, player cannot be chosen for WO or NCO at same time niether. These player do not have to be playing.

Finally there is the zerg player: this chooses who will be the alien which is disguised as human, this can be anyplayer but the player has to be playing or it has to repick until it chooses a playing player...

When i say choose or chosen i mean when the trigger randomly gives player a rank.

I get the captain trigger you made up, but i don't know how i'm gonna make my triggers like that...
 
Last edited:
Status
Not open for further replies.
Top