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

[General] Several questions

Status
Not open for further replies.

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
1/Can I display 1 dialog (note that this dialog has been set to a Variable) to several players at the same time?
2/What is the Player Index? I see it in convert - player index to player
3/I want when the player type -ally (number), they will be ally with the player with that player index. So I make a trigger like this:
  • Ally
    • Events
      • Player - Player 1 (Red) types a chat message containing -ally as A substring
      • Player - Player 2 (Blue) types a chat message containing -ally as A substring
      • Player - Player 3 (Teal) types a chat message containing -ally as A substring
      • Player - Player 4 (Purple) types a chat message containing -ally as A substring
      • Player - Player 5 (Yellow) types a chat message containing -ally as A substring
      • Player - Player 6 (Orange) types a chat message containing -ally as A substring
      • Player - Player 7 (Green) types a chat message containing -ally as A substring
      • Player - Player 8 (Pink) types a chat message containing -ally as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -ally as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -ally as A substring
    • Conditions
    • Actions
      • Player - Make (Triggering player) treat (Player((Integer((Entered chat string))))) as an Ally with shared vision and full shared units
However, I cannot test it (since I'm alone and my computer isnt strong enough). So is there any problems with that trigger?
Another question: If I have 10 players but the last player is in position Dark Green (player 11), then will the Player Index change?
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
1- Yes, you can use a loop or display message to force (player group)

2- It's the player number Player 1 is Player(1) and so on.

3- You have to use substring.

1 -
2 a
3 l
4 l
5 y
6
7 #

Substring takes a part of a string. You have to take Substring((Entered Chat String), 7, 8).
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Well, at my previous thread, I have asked for permission for a map and now I'm editing it. (Just for play with my friends and not posting on any site since the author havent replied yet, actually, he has dropped that map and disappear :D). In that map, there is 10 player (1 to 11, not include the Gray player (player 9)) so it messed up with some of my new triggers. :D
 
Status
Not open for further replies.
Top