• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Dialog Transparency for Specific Player

Status
Not open for further replies.
Level 1
Joined
Jun 17, 2010
Messages
2
Hello,

I have a question regarding the action "Dialog - Set transparency of (dialog)". Is there a way to make it so that it would only affect certain players? For example, a similar action "Dialog - Hide (dialog) for (player group)", only affect specified players.

I would imagine that this is do-able via custom script, but I have no idea how. Any help would be greatly appreciated.
 
Level 6
Joined
May 27, 2007
Messages
162
I am having the same problem.




  • Dialog - Show Save Menu Dialogue[1] for (All players)
How do I make ^ that trigger into this

Dialog - Show Save Menu Dialogue[1] for Player 1. or 2, or 3. etc

edit: Just so you know 'Save Menu Dialogue[1]' is an array variable name.





Thought I would bump your post instead of creating my own.
 
Level 6
Joined
May 27, 2007
Messages
162
I figured it out.

It is indeed as someone else pointed out previously - Starcraft 2 has no 'Players'... ironic...

All 'Players' are now numbers. And if you want to target a single player in a trigger (such as the ones above) - you need to create a Player Group Variable (as a local of that trigger); and then use the function 'Convert Player to Player Group'. So that way, you have a player group - containing the player you want to target.

Seem's extremely long-winded and unnecessary - but that is something you tend to get used to with the Galaxy Editor. If anyone know's a simpler way of achieving this, please let us know!

so what used to be this in WarEdit:

  • Do this action - make it affect Player 1
Is now translated into this in GalaxyEditor:

  • Local Variable = Dummy Player Group = 'Empty' <Player Group>
  • Actions:
  • Variable - Set Dummy Player Group = (Player Group(1))
  • Do this action - make it affect Dummy Player Group
 
To do so, you have to create an array dialog variable that keeps every dialog for every player. Therefore:
  • Dialog
    • Events
      • Map initialization
    • Local Variables
      • Loop = 0 <Integer>
    • Conditions
    • Actions
      • General - For each integer Loop from 1 to 12 with increment 1, do (Actions)
        • Actions
          • Dialog - Create a Modal dialog of size (500, 400) at (0, 0) relative to Top Right of screen
          • Variable - Set Dialog[Loop] = (Last created dialog)
    • ------- If want to set transparency, eg. Player 1
    • Dialog - Set transparency of Dialog[1] to 10.0
 
Status
Not open for further replies.
Top