Anyone can help me create this trigger : ) ?

zerichi

New Member
Reaction score
0
:banghead: Okay , seriously im not good with triggers !:banghead:

Anyone who can create this trigger for me please : -
It does :
creates a dialog box
asks which mode : set kills to win or more kills when time expire .
Then the triggers for those modes .

Create it on a new map and send it to me please : ) .
I'll be sure to + Your Rep ! :thup:

Please : ) Help me . <3
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
I didnt make like 100 different numbers so i made a few examples that are easy to follow. I hope you know how to destroy leaks i think it leaks a lil.
Hmmm i just tested it some some "leak destroying system" not sure how good it is but i said there were no leaks. Still dont trust it. Can some1 take a look at this code.
Trigger:
  • DialogBox
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • Dialog - Clear ModeDialog
      • Dialog - Change the title of ModeDialog to Kills to win the ga...
      • Dialog - Create a dialog button for ModeDialog labelled 5
      • Set ModeDialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for ModeDialog labelled 10
      • Set ModeDialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for ModeDialog labelled 15
      • Set ModeDialogButton[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for ModeDialog labelled 20
      • Set ModeDialogButton[4] = (Last created dialog Button)
      • Dialog - Show ModeDialog for Player 1 (Red)

Trigger:
  • Dialog Button press
    • Events
      • Dialog - A dialog button is clicked for ModeDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to ModeDialogButton[1]
        • Then - Actions
          • Set Kills_Needed = 5
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to ModeDialogButton[2]
            • Then - Actions
              • Set Kills_Needed = 10
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to ModeDialogButton[3]
                • Then - Actions
                  • Set Kills_Needed = 15
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to ModeDialogButton[4]
                    • Then - Actions
                      • Set Kills_Needed = 20
                    • Else - Actions

Trigger:
  • Hero Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Dying unit) is A Hero) Equal to True
          • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Set Kills_Win = (Kills_Win + 1)

Trigger:
  • Checking Kills
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills_Win Greater than or equal to Kills_Needed
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
        • Else - Actions
 

zerichi

New Member
Reaction score
0
Thanks ! : ) +REP

Edit :

Why if i test it on LAN game .
After the map has just finished loading
then suddenly a victory dialog box came out
Continue Game
Quit Campaign
Any idea ?
and 1 more thing ,
in this map there are 4 players ( FFA )
But the problem is , when i set a specific kills to win .
It has to be a one player kill .
I mean example : when i set 5 kills to win .
If i killed my enemy about 3 times and he killed me 2 times .
= 5 kills = Victory trigger .
Could you fix'em ?
 

TheAbyss

New Member
Reaction score
2
In that case, you'll need to delete the last one and change the third one, but keep the first 2 the same. You'll need 2 more Variables, let's call one Kills, and make it an array 4 Integer Variable. For the other one, call it Losers and make it a Player Group. For the 3rd trigger there, change the Kills_Needed setter to Set Kills [Player Number of (Owner of (Killing unit))] = Kills [Player Number of (Owner of (Killing unit))} + 1
then add on this to the end:
Trigger:
  • If Kills [Player Number of (Owner of (Killing unit))] = Kills_Needed Then do Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores) else do (Skip remaining actions)
    • Set Losers = (All Players)
    • Player Group - Remove (Owner of (Killing unit)) from Losers
    • Player Group - Pick every player in Losers and do (Game - Defeat (Picked player with the message: Defeat!)

That should do it. :D No clue about the first problem though. Maybe because the Kills_Needed and Kills_Win both had initial values of 0. If this is the case, it should be fixed here.
 

Chaos_Knight

New Member
Reaction score
39
I didnt make like 100 different numbers so i made a few examples that are easy to follow. I hope you know how to destroy leaks i think it leaks a lil.
Hmmm i just tested it some some "leak destroying system" not sure how good it is but i said there were no leaks. Still dont trust it. Can some1 take a look at this code.
Trigger:
  • DialogBox
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • Dialog - Clear ModeDialog
      • Dialog - Change the title of ModeDialog to Kills to win the ga...
      • Dialog - Create a dialog button for ModeDialog labelled 5
      • Set ModeDialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for ModeDialog labelled 10
      • Set ModeDialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for ModeDialog labelled 15
      • Set ModeDialogButton[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for ModeDialog labelled 20
      • Set ModeDialogButton[4] = (Last created dialog Button)
      • Dialog - Show ModeDialog for Player 1 (Red)

Trigger:
  • Dialog Button press
    • Events
      • Dialog - A dialog button is clicked for ModeDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to ModeDialogButton[1]
        • Then - Actions
          • Set Kills_Needed = 5
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to ModeDialogButton[2]
            • Then - Actions
              • Set Kills_Needed = 10
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to ModeDialogButton[3]
                • Then - Actions
                  • Set Kills_Needed = 15
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to ModeDialogButton[4]
                    • Then - Actions
                      • Set Kills_Needed = 20
                    • Else - Actions

Trigger:
  • Hero Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Dying unit) is A Hero) Equal to True
          • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Set Kills_Win = (Kills_Win + 1)

Trigger:
  • Checking Kills
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills_Win Greater than or equal to Kills_Needed
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
        • Else - Actions

I just wonder, why do you victory all??
 

tooltiperror

Super Moderator
Reaction score
231
Because he assumed the game would end.
 

zentel

New Member
Reaction score
0
Can some one edit this Map with 2 teams conditions .if one team wins then other team loses i tried your way TheAbyss but i dont know what i am doing wrong here ...
 

shazada

New Member
Reaction score
0
Can some one edit this Map with 2 teams conditions .if one team wins then other team loses i tried your way TheAbyss but i dont know what i am doing wrong here ...

I am trying to do the same thing but it ain't working its very hard :S some one please edit the map zentel gave and set victory defeat conditions depending on leaderboard of this map
 

Endless_Trev

New Member
Reaction score
5
Here, simple as. Also you might wanna mess around with disabling user control for player 2 while player 1 picks mode, otherwise you got ppl doing whatever while the first player is stuck choosing.
Also because im especially bored, a leaderboard to keep track of kills.
 

Attachments

  • Edited Map.w3x
    19.6 KB · Views: 191
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top