Show triggers

Level 16
Joined
Dec 12, 2021
Messages
206
Could you help me see the triggers for a map? I can't open the map, much less see its triggers.
I would like to specifically see the race system used by this map, which I'll leave here below. It's the only race selection system I've seen that doesn't lag, unlike the rest, where you need a Vjass code and it lags excessively, especially when playing with 8 players. However, I haven't seen that lag on this map, even though it implemented multiple players.
 

Attachments

  • El despertar de los Naga.w3x
    9.7 MB · Views: 3
Level 12
Joined
Nov 13, 2010
Messages
277
it seams like the map is protect but i made somthing where you pick a race at the start of the map

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Set VariableSet PlayerColour[0] = Player 1 (Red)
      • Set VariableSet PlayerColour[1] = Player 2 (Blue)

  • Dialog Box Races
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Dialog - Create a dialog button for DialogBox[0] labelled |cff80ff80Vanilla|r
      • Set VariableSet DialogButtons[0] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogBox[0] labelled |cff80ff80Altered|r
      • Set VariableSet DialogButtons[1] = (Last created dialog Button)

  • Player Intialization
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Wait 5.00 seconds
      • For each (Integer PlayerNum[4]) from 0 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PlayerColour[PlayerNum[4]] controller) Equal to User
            • Then - Actions
              • Dialog - Show DialogBox[0] for PlayerColour[PlayerNum[4]]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (PlayerColour[PlayerNum[4]] controller) Equal to Computer
                • Then - Actions
                  • Melee Game - Create (Race of PlayerColour[PlayerNum[4]]) starting units for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) (Include Heroes)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Human) then do (Unit - Create 1 Paladin for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Night Elf) then do (Unit - Create 1 Priestess of the Moon for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Undead) then do (Unit - Create 1 Dreadlord for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Orc) then do (Unit - Create 1 Tauren Chieftain for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Player 1 (Red) controller) Equal to Computer) then do (Player - Set name of Player 1 (Red) to set a name) else do (Do nothing)
                  • If ((Player 2 (Blue) controller) Equal to Computer) then do (Player - Set name of Player 2 (Blue) to set a name) else do (Do nothing)
                • Else - Actions
                  • Do nothing

  • Dialog Button Press
    • Events
      • Dialog - A dialog button is clicked for DialogBox[0]
    • Conditions
    • Actions
      • -------- Vanilla --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtons[0]
        • Then - Actions
          • Unit - Create 1 Town Hall for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
          • Unit - Create 5 Peasant for (Triggering player) at (Center of (Region centered at ((Triggering player) start location) with size (0.00, 7.00))) facing ((Triggering player) start location)
        • Else - Actions
          • Do nothing
      • -------- Altered --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtons[1]
        • Then - Actions
          • Unit - Create 1 Great Hall for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
          • Unit - Create 5 Peon for (Triggering player) at (Center of (Region centered at ((Triggering player) start location) with size (0.00, 7.00))) facing ((Triggering player) start location)
        • Else - Actions
          • Do nothing

you can ofc add more Races to it if you like
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
I remember I coded this for a techtree contest quite some years ago. I don't really see why it would lag.

I combined this idea (ui wise) [GUI] Conversation System with spawning the correct workers.

I figure if you look at the winning techtree contest entries I would guess they have some sort of selection system that does not lag.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
It's the only race selection system I've seen that doesn't lag, unlike the rest, where you need a Vjass code and it lags excessively, especially when playing with 8 players.
I fail to see how something that only does 1 thing for each player only once in the map (at map start) could cause some sort of periodic lag.

It’s my best guess that you are using code that doesn’t use the Preload() native and there is a this a hiccup when a bunch of not-previously-loaded models are thrust into the game all at once.
 
Level 16
Joined
Dec 12, 2021
Messages
206
Hey bro, sorry for the delay, I was testing it and indeed, it does work, but I've noticed a couple of errors:
1. There are certain functions you included in which as soon as the game starts, the enemy computer already starts with its hero created, for example the undead have their dreadlord, humans start with their paladin, orcs with their tauren chieftain, etc. I've figured out how to solve this, I just deleted the commands that said to start creating these heroes for their corresponding races, so I think that's enough.
2. In the case of the undead and night elves, there are problems with the gold mines, since both start with entangled mines. In my case, it can't be done, it appears without an entangled or enchanted mine, and on the computer its enchanted mine does appear. I still don't know if the other players have this problem (since my map is designed for multiplayer and it's something that should be fixed no matter what and I don't know how).
3. Regarding the lag, I couldn't say exactly because I haven't tested the map properly with these commands yet, so I guess I'll let you know, but for now I'd like you to help me with the errors I mentioned so I can fix them soon, please...


Regarding what others said, I did have lag with other types of race systems since they used GUI/MUI and at the same time used vJass commands at the start of the map, and I noticed lag, especially when I demolished an enemy building the game froze for quite a while, likewise there was intermittent lag throughout the game, especially if I played with more players (from 5 to 8)
 
Level 16
Joined
Dec 12, 2021
Messages
206
With the last system my friend gave me, I haven't had any lag issues, but I did have the issues I mentioned before, like the enchanted mine and the fact that it only allows you to choose 2 players...
On the other hand, the systems I used before for race selection (it was a system taken from the hive, which was in GUI but also combined a vJAss code), that system caused me too much lag, and I managed to verify this by eliminating all the triggers I had and leaving only that system on my map, and indeed the lag was chaotic... I'll try to find out what the system was so I can leave it here and you can check it out for yourself.
I found it, it is in gui and uses the vjass code, this is the system that I used a long time ago and it caused too much lag to my map, especially when I play with 8 or more players, and I destroy an enemy building, you will see that it lags even more, there was another system similar to this that also has too much lag, and is somewhat difficult to control, and more if I want to implement my game to multiplayer, the lag is too annoying for all users.
System Race Map
 
Last edited:
Top