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

Why the players cannot get units?

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,124
Hello everyone. I have my own Trolls & Elves version and after the voting, players cannot get Troll or Elves.

Here is the triggers

  • DiyalogYapma
    • Events
    • Conditions
    • Actions
      • Dialog - Clear Diyalog1
      • Dialog - Change the title of Diyalog1 to Troll olmak ister m...
      • Dialog - Create a dialog button for Diyalog1 labelled Evet
      • Set DiyalogBoku[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Diyalog1 labelled Hayir
      • Set DiyalogBoku[2] = (Last created dialog Button)
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Dialog - Show Diyalog1 for (Picked player)
And here is the dialog windows.

  • SecimAsamasi
    • Events
      • Dialog - A dialog button is clicked for Diyalog1
      • Dialog - A dialog button is clicked for Diyalog2
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DiyalogBoku[1]
        • Then - Actions
          • Player Group - Add (Triggering player) to TrollPlease
          • Game - Display to (All players) the text: (Troll isteyenler; + (Name of (Triggering player)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DiyalogBoku[2]
        • Then - Actions
          • Player Group - Add (Triggering player) to ElfPlease
          • Game - Display to (All players) the text: (Elf isteyenler; + (Name of (Triggering player)))
        • Else - Actions
      • Wait 5.00 seconds
      • Trigger - Run SecimAsamasiDevam <gen> (checking conditions)
SecimAsamasi triggers this one

  • SecimAsamasiDevam
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in TrollPlease and do (Actions)
        • Loop - Actions
          • Set TrollSelectedPLAYER = (Random player from TrollPlease)
          • Game - Display to (All players) for 2.00 seconds the text: (Name of TrollSelectedPLAYER)
          • Player Group - Remove TrollSelectedPLAYER from TrollPlease
          • Player Group - Remove TrollSelectedPLAYER from ElfPlease
          • Player Group - Pick every player in TrollPlease and do (Actions)
            • Loop - Actions
              • Player Group - Add (Picked player) to ElfPlease
          • Player Group - Remove all players from TrollPlease
          • Game - Display to (All players) for 10.00 seconds the text: Troll 31 saniye son...
          • Countdown Timer - Start TrollSayacTimer as a One-shot timer that will expire in 5.00 seconds
          • Countdown Timer - Create a timer window for TrollSayacTimer with title Troll 31 saniye son...
          • Set TrollSayac = (Last created timer window)
      • Player Group - Pick every player in ElfPlease and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Elf for (Picked player) at BaslangicYeri facing Default building facing degrees
          • Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 0.00 seconds
          • Selection - Add (Last created unit) to selection for (Picked player)
When i test it on by myself, i can get Troll or Elves. But when it comes to multiplayer, no one gets any of the units. What am i missing?
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,124
i don't know what trolls and elves is but it looks like you remove all players from TrollIstemeyenler then later in that trigger you give an Elf to everyone in that group but no one is in that group.
Ok here is the situation. Read the first post again. I have changed group name for better reading.
It is working now but why it creates 2 elves? I have tested it with my friend.
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
Uhm how can i give 1 Elves for each players?
you need the trigger SecimAsamasiDevam to only trigger 1 time. not once per player.

so you need some way of detecting when all players finished clicking dialog boxes.

you could add the players that click the dialog to a player group, and if the number of players in that player group == the number of players, then you fire the "SecimAsamasiDevam" trigger.
 
Level 18
Joined
Mar 16, 2008
Messages
721
maybe just put "turn off (this trigger)" at the end of SecimAsamasi to stop it running from multiple times,

and if anyone did not interact with the dialog assume they are an elf. this would put and incentive to not interact with the dialog if you don't want to be a troll though?
 
Level 17
Joined
Jun 2, 2009
Messages
1,124
@Gnuoy and @Cheshire Sadly trun off trigger not worked. By the way Cheshire i don't know how to do as you told..

This trigger creates more than 1 elves for each players. I want to give only 1 unit for players. How can i do that?

  • Player Group - Pick every player in ElfPlease and do (Actions)
    • Loop - Actions
      • Trigger - Turn off (This trigger)
      • Unit - Create 1 Elf for (Picked player) at BaslangicYeri facing Default building facing degrees
If Player 1 and Player 2 playing, it gives 2 elves to the Player 2
If the players 1,2 and 3 playing, it gives 3 elves for the player 2 and player 3
And goes on like this. I just want to give 1 elf for each players.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
i'm suggesting something different than Cheshire. Overall I think his solution would be better.

but you didn't do what i was suggesting. you need to put "turn off (this trigger)" at the complete end off all the actions in SecimAsamasi, not in a loop or before any other action.
 
Level 17
Joined
Jun 2, 2009
Messages
1,124
i'm suggesting something different than Cheshire. Overall I think his solution would be better.

but you didn't do what i was suggesting. you need to put "turn off (this trigger)" at the complete end off all the actions in SecimAsamasi, not in a loop or before any other action.
Uhm... Like this?

  • SecimAsamasi
    • Events
      • Dialog - A dialog button is clicked for Diyalog1
      • Dialog - A dialog button is clicked for Diyalog2
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DiyalogBoku[1]
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Player Group - Add (Triggering player) to TrollPlease
          • Game - Display to (All players) the text: (Troll isteyenler; + (Name of (Triggering player)))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DiyalogBoku[2]
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Player Group - Add (Triggering player) to ElfPlease
          • Game - Display to (All players) the text: (Elf isteyenler; + (Name of (Triggering player)))
        • Else - Actions
      • Wait 5.00 seconds
      • Trigger - Run SecimAsamasiDevam <gen> (checking conditions)
 
Level 18
Joined
Mar 16, 2008
Messages
721
no i mean SecimAsamasiDevam, turn off the trigger that gives out elves or trolls after it gives everyone an elf or troll. that way everyone will only get 1 elf or troll.

but this also leaves a problem for anyone that didn't interact with the dialog. so you could just add those people to troll or elf group by default. or start all players out in elf group by default. might be better to just combine SecimAsamasi and SecimAsamasiDevam, so as soon as they interact with the dialog then they get their unit.
 
Level 17
Joined
Jun 2, 2009
Messages
1,124
no i mean SecimAsamasiDevam, turn off the trigger that gives out elves or trolls after it gives everyone an elf or troll. that way everyone will only get 1 elf or troll.

but this also leaves a problem for anyone that didn't interact with the dialog. so you could just add those people to troll or elf group by default. or start all players out in elf group by default. might be better to just combine SecimAsamasi and SecimAsamasiDevam, so as soon as they interact with the dialog then they get their unit.
I am totally lost. Here is the map if anyone interest. I am totally confused and since 4 days i am trying to fix this..
 

Attachments

  • Troll JFA (testin testi).w3x
    284.5 KB · Views: 6
Level 18
Joined
Mar 16, 2008
Messages
721
i just mean like this. i can help in more detail tomorrow.

  • SecimAsamasiDevam
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in TrollPlease and do (Actions)
        • Loop - Actions
          • Set VariableSet TrollSelectedPLAYER = (Random player from TrollPlease)
          • Game - Display to (All players) for 2.00 seconds the text: (Name of TrollSelectedPLAYER)
          • Player Group - Remove TrollSelectedPLAYER from TrollPlease.
          • Player Group - Remove TrollSelectedPLAYER from ElfPlease.
          • Player Group - Pick every player in TrollPlease and do (Actions)
            • Loop - Actions
              • Player Group - Add (Picked player) to ElfPlease
          • Player Group - Remove all players from TrollPlease.
          • Game - Display to (All players) for 10.00 seconds the text: Troll 31 saniye son...
          • Countdown Timer - Start TrollSayacTimer as a One-shot timer that will expire in 5.00 seconds
          • Countdown Timer - Create a timer window for TrollSayacTimer with title Troll 31 saniye son...
          • Set VariableSet TrollSayac = (Last created timer window)
      • Player Group - Pick every player in ElfPlease and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ElfiniSikeyim[(Player number of (Picked player))] Equal to False
            • Then - Actions
              • Unit - Create 1 Elf for (Picked player) at BaslangicYeri facing Default building facing degrees
              • Set VariableSet ElfiniSikeyim[(Player number of (Picked player))] = True
              • Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 0.00 seconds
              • Selection - Add (Last created unit) to selection for (Picked player)
            • Else - Actions
      • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Top