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

Game Message when Player Enters

Status
Not open for further replies.
Level 3
Joined
Aug 16, 2012
Messages
21
What I want is something basically like SotDRP. I toyed around for a bit but couldn't quite get it to work. Anyway.

I was looking for something that sends a global message to all players when player XXXX is in the game.

I plan to use it for myself and my partner to emphasize that a mapmaker is ingame. So it'd have to be able to show two seperate message or one message, saying XXX and XXX are in the game. But when just one of us, it has to say XXX is in the game.

Help appreciated.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
this may do it, you just have to change some things a little bit(the content of players name), however this may not be the most effective way of doing it, my GUI is not perfect since Ive not done anything spectacular in it for a long time.
  • Untitled Trigger 003
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Name of (Player((Integer A)))) Equal to YourName
            • Then - Actions
              • Set str = Map Maker
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Name of (Player((Integer A)))) Equal to YourFriend
            • Then - Actions
              • Set str2 = Map Makers Friend
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • str Equal to Map Maker
          • str2 Equal to Map Makers Friend
        • Then - Actions
          • Game - Display to (All players) the text: Map Creator and Map...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • str Equal to Map Maker
              • str2 Not equal to Map Makers Friend
            • Then - Actions
              • Game - Display to (All players) the text: Map Creator is in g...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • str Not equal to Map Maker
                  • str2 Equal to Map Makers Friend
                • Then - Actions
                  • Game - Display to (All players) the text: Map Creators friend...
                • Else - Actions
str and str2 are strings
as the game messages are cut:
first one:
Map Creator and Map Creators Friend are in game.
second one:
Map Creator is in game.
third one:
Map Creators friend is in game.
 
Last edited:
Level 3
Joined
Aug 16, 2012
Messages
21
Fixed. Still not working.

2pplfyt.png
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
when you test map from editor your name is set to WorldEdit so you need to open the map. - if this is not problem I dont know, I dont see anything wrong there
also triggers can be put like Ive did it, between [ trigger]trigger here [/trigger]. Just right click the trigger and press copy as text.
 
Level 3
Joined
Aug 16, 2012
Messages
21
Nope

when you test map from editor your name is set to WorldEdit so you need to open the map.


Yeah. It was changed when I tested. To make sure, I changed it back to Vallon and headed on bnet to test it out. Not workin. :/
 
Level 3
Joined
Aug 16, 2012
Messages
21
Actually. Think I know what I may have done wrong. Would I be needing to check teh Array box for the custom str?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Just a hint: you can post triggers directly in the hive.
Copy the trigger (right-click on the trigger name above the events and select "Copy as text").
Then write "[trigger]", paste the trigger you just copied and write "[/trigger]".
The trigger should show up as it would in the world editor (a bit more easy than print screen, upload in tinypic, show link here).


Anyway, the trigger.
  • Creator Shoutout
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set creatorNames[1] = WorldEdit
      • Set creatorNames[2] = Computer (Easy)
      • Set creatorNames[3] = Computer (Normal)
      • Set creatorNames[4] = Computer (Insane)
      • -------- Show creator names --------
      • Set tempString = <Empty String>
      • Set tempInt = 0
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Name of (Picked player)) Equal to creatorNames[(Integer A)]
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tempInt Greater than 0
                    • Then - Actions
                      • Set tempString = (tempString + and )
                    • Else - Actions
                  • Set tempString = (tempString + creatorNames[(Integer A)])
                  • Set tempInt = (tempInt + 1)
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempInt Greater than 1
        • Then - Actions
          • Set tempString = (tempString + are in the game.)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempInt Equal to 1
            • Then - Actions
              • Set tempString = (tempString + is in the game.)
            • Else - Actions
      • Game - Display to (All players) the text: tempString
You can add/remove players at the top of the trigger.
If you ever change the amount of players at the top (the variables), then be sure to change the for-loop as well (if you only have 2 names, then change it to "from 1 to 2").

The downside: with more than 2 players, it will say "Name1 and Name2 and Name3", instead of using a comma.
I would be able to fix that, but it would lengthen the trigger by quite a bit. I decided to leave that as it is.

Map attached.
Tested, should work.
 

Attachments

  • Creator Shoutout.w3x
    13.9 KB · Views: 30
Status
Not open for further replies.
Top