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

Help with hero selection

Status
Not open for further replies.
Level 6
Joined
Sep 2, 2005
Messages
234
Code:
Time - Elapsed game time is 0.01 seconds

(Triggering player) Not equal to Player 1 (Red)Actions
    Unit - Create 1 Ranger for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees


Player Group - Pick every player in (All players matching ((Triggering player) Not equal to Player 1 (Red))) and do (If (((Picked player) slot status) Equal to Is playing) then do (Dialog - Show MyDialog for (Triggering player)) else do (Do nothing))


Map initialization

(Triggering player) Not equal to Player 1 (Red)

Actions
    Dialog - Create a dialog button for MyDialog labelled Ranger
    Set Ranger = (Last created dialog Button)
    Dialog - Create a dialog button for MyDialog labelled Sniper
    Set Sniper = (Last created dialog Button)
    Dialog - Create a dialog button for MyDialog labelled Demoiltions
    Set Demoiltions = (Last created dialog Button)
    Dialog - Create a dialog button for MyDialog labelled Heavy Ordiance
    Set HeavyOrd = (Last created dialog Button)


Events
    Dialog - A dialog button is clicked for MyDialog

Conditions
    (Triggering player) Not equal to Player 1 (Red)
    (Clicked dialog button) Equal to Ranger

Actions
    Unit - Create 1 Ranger for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees


Events
    Dialog - A dialog button is clicked for MyDialog

Conditions
    (Triggering player) Not equal to Player 1 (Red)
    (Clicked dialog button) Equal to Sniper

Actions
    Unit - Create 1 Sniper for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees

Events
    Dialog - A dialog button is clicked for MyDialog

Conditions
    (Triggering player) Not equal to Player 1 (Red)
    (Clicked dialog button) Equal to HeavyOrd

Actions
    Unit - Create 1 Heavy Ordanance for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees

Events
    Dialog - A dialog button is clicked for MyDialog

Conditions
    (Triggering player) Not equal to Player 1 (Red)
    (Clicked dialog button) Equal to Demoiltions

Actions
    Unit - Create 1 Demolitions for (Triggering player) at ((Triggering player) start location) facing Default building facing (270.0) degrees

It doesn't come up with anything for any player
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
Triggering player only works if a player is in the event.

Code:
Untitled Trigger 001
    Events
        Time - Elapsed game time is 0.01 seconds
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (If ((Picked player) Not equal to Player 1 (Red)) then do (Dialog - Show MyDialog for (Picked player)) else do (Do nothing))

Code:
Map initialization


Actions
    Dialog - Create a dialog button for MyDialog labelled Ranger
    Set Ranger = (Last created dialog Button)
    Dialog - Create a dialog button for MyDialog labelled Sniper
    Set Sniper = (Last created dialog Button)
    Dialog - Create a dialog button for MyDialog labelled Demoiltions
    Set Demoiltions = (Last created dialog Button)
    Dialog - Create a dialog button for MyDialog labelled Heavy Ordiance
    Set HeavyOrd = (Last created dialog Button)
 
Status
Not open for further replies.
Top