Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Make Text Message show to all player ?
Make Text Message show to all player ?
Dec 30 2010, 2:08 pm
By: Ashura  

Dec 30 2010, 2:08 pm Ashura Post #1



Ok so i have finished with my Conditions and Actions using Player x , Player z and I chose (tick) Player 1,2,3,4 etc. in the players, it appears that when the trigger is running the text message which I made show only to one player. How can I make the text message to show to all player when the trigger is activated by only one or two player.

Possible ? THX ! :D

It's a part of my Diplo Map. I'm trying to make a diplomacy system which you can't bs people by unally without declaration so I forced them to unally by using triggers and the declaration text must show to all player in the game.



None.

Dec 30 2010, 2:30 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

General idea: Set a death count or a switch to control the display function.

trigger 1:
C: -whatever
A:
-set Switch 1
-wait 0
-clear Switch 1
-preserve trigger

trigger 2:
P: All Players or Force or something like that
C: -If Switch 1 is set
A:
-display the message for current player
-preserve trigger

This does work, if no human player has other waits running (except hypertriggers at the end of the trigger list).


Alternatively you can use a death count for each player and ADD a specific value (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ...) to store the information.
Then you have triggers belonging to All Players with the conditions "at least 512", "st least 256", "at least 128" which will result in displaying an information and SUBTRACTING the specific value.
This solution would need 1 unit's death count as a variable for each player.

How many messages do you want to be able to display?




Dec 30 2010, 2:46 pm Ashura Post #3



Why do you have to use wait in the first trigger ?

And if i want the message to show only to 2 players, can i just choose Player a, Player b in trigger 2. Will that work too ?

Oh also if the trigger is activated but I want the 2 messages to be shown to only 2 players differently. How would I do that ?

For eg.
USA tribute Great Britain for 1k
Message to USA: You have tributed $1000 to Great Britain
Message to Great Britain: You have received $1000 from USA.

How would I do that ? Do I have to make the 3 triggers for this ? So on the 2nd one its a message for USA and the 3rd is a message for GB ? Hmmmm ? thx so far though I'll try it out after this reply.



None.

Dec 30 2010, 3:08 pm Ahli Post #4

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from Ashura
Why do you have to use wait in the first trigger ?
The wait is there to have the switch set within the complete trigger cycle.
Without the wait the switch will be set and cleared without any other triggers checked. The wait(0) will cause the following actions to be performed during the next trigger cycle.

Quote from Ashura
And if i want the message to show only to 2 players, can i just choose Player a, Player b in trigger 2. Will that work too ?
Yes, that would work.

Quote from Ashura
Oh also if the trigger is activated but I want the 2 messages to be shown to only 2 players differently. How would I do that ?

For eg.
USA tribute Great Britain for 1k
Message to USA: You have tributed $1000 to Great Britain
Message to Great Britain: You have received $1000 from USA.

How would I do that ? Do I have to make the 3 triggers for this ? So on the 2nd one its a message for USA and the 3rd is a message for GB ? Hmmmm ? thx so far though I'll try it out after this reply.
You can do that like you described. But there may be better solutions depending how you designed your tribute mechanics.




Dec 30 2010, 5:12 pm Gigins Post #5



I usually have lots of various messages I want to show to all players including sounds and stuff. I've made up a nice message system for my maps. It use 1 Death Counter(DC) which can show almost infinite number of messages and sounds to all or chosen players. Here is what I do.
1) rename an unused unit to "msg#" or something, we'll rename it to "DC".
2) make a list of messages on paper or in notepad. like DC1 "random text1"; DC2 "random text with sound"; DC3 "random text2" and so on. You can populate the list during making the map, you don't have to make it all up instant.
3) Make a trigger for each message.
Trigger
Players
  • All Players
  • Conditions
  • Current player suffers exactly 1 deaths of DC
  • Actions
  • Set deaths for current player to 0 of DC
  • Display text message
  • Preserve trigger

  • Trigger
    Players
  • All Players
  • Conditions
  • Current player suffers exactly 2 deaths of DC
  • Actions
  • Set deaths for current player to 0 of DC
  • Display text message
  • play sound
  • Preserve trigger


  • Now every message and/or sound has a different number on your list. To display text/play sound of the 10th message of your list to all players, have a trigger with these actions.
    Trigger
    Players
    None specified.
    Conditions
    None specified.
    Actions
  • Set deaths of DC to 10 for all players

  • To display the 4th message of your list to Force1 have this in your trigger.
    Trigger
    Players
    None specified.
    Conditions
    None specified.
    Actions
  • Set deaths of DC to 4 for Force1


  • With this you can display any text or sound any time to anyone in the game. Good luck!



    None.

    Dec 31 2010, 12:49 am Ashura Post #6



    Hmmm thk ! so far. I will try it out now and see what they could do if I encounter any problem I will post it here then. :D

    BTW. My tribute system is to use Drone to pick up the powerup and then walk to a location to tribute. (Like in Diplo InFi) but mine will be more advanced cuz it got something like Declaration of War, Peace Treaty etc.. too

    THX so far though guys ! :lol:



    None.

    Dec 31 2010, 3:03 am rockz Post #7

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Quote from Ashura
    more advanced
    There's a difference between more advanced and easier to use/learn. If you wanted to be really advanced, you'd use a toggle unit (reaver, tank, burrowing zerg unit, or just any unit which can walk to 2 different locations), and detect when you have the player's tribute/whatever beacon/building selected to do an action. If that doesn't make sense (which it probably doesn't) then you can see why advanced does not necessarily mean it's better.

    If you make it like the other diplomacies, everyone will know exactly how to use it, and exactly what to do. No learning curve, no nothing.

    I'm a bit worried that dealing with powerups will be slightly difficult/annoying, but I think you know your map better than I do, so take my ideas with a grain of salt.



    "Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

    Dec 31 2010, 3:04 am Vrael Post #8



    The real problem here is that you probably don't understand exactly how triggers work. Read this, and you will :D

    http://www.staredit.net/starcraft/Triggers



    None.

    Dec 31 2010, 9:05 am Ashura Post #9



    Ok Ahli I have tested the switch you told me to but when the trigger is activated, yes the text appeared to all players but they keep appearing and appearing like for a moment while not continue the other actions in the first trigger.

    Does this issue has something to do with hyper trigger ? cuz there's hyper trigger in my map...

    I tried changing the Wait time from 0 to something like 300 but it still didn't work the text keep appearing a lot for a moment, how can i solve this ? THX !

    Oh and in the first time I used All Players then when I encountered the problem I changed it to Force 1,2,3 (the Player 7 which contains hyper trigger is in Force 4) but it doesn't help anything still.... :-(

    --------------------------

    edit. I removed the hyper trigger from the computer player and tried.... it didn't work the text still came up a lot and delay to continue the other actions, it seems to me that the switch didn't clear in time so when it is set the text keep popping up until the switch is cleared. Why its like that ? Help PLZ :><:

    Post has been edited 1 time(s), last time on Dec 31 2010, 9:20 am by Ashura.



    None.

    Dec 31 2010, 1:50 pm Gigins Post #10



    Try my method. There's no waits or anything that could mess up, just plain and simple if a player has certain number of DC, which you set him to have, he sees the msg an it goes back to 0.



    None.

    Dec 31 2010, 2:30 pm Ahli Post #11

    I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

    Quote from Ashura
    Ok Ahli I have tested the switch you told me to but when the trigger is activated, yes the text appeared to all players but they keep appearing and appearing like for a moment while not continue the other actions in the first trigger.

    Does this issue has something to do with hyper trigger ? cuz there's hyper trigger in my map...

    I tried changing the Wait time from 0 to something like 300 but it still didn't work the text keep appearing a lot for a moment, how can i solve this ? THX !

    Oh and in the first time I used All Players then when I encountered the problem I changed it to Force 1,2,3 (the Player 7 which contains hyper trigger is in Force 4) but it doesn't help anything still.... :-(

    --------------------------

    edit. I removed the hyper trigger from the computer player and tried.... it didn't work the text still came up a lot and delay to continue the other actions, it seems to me that the switch didn't clear in time so when it is set the text keep popping up until the switch is cleared. Why its like that ? Help PLZ :><:
    You have some wait blocks in your trigger (which keeps the wait in the first trigger from being worked on [sc only works on 1 wait at a time per player]).
    If you post or pm me the map, I can identify the problem.

    Else you can still use Gigin's method (which is basically what my second method was, just much better explained). You only would have some information loss, if you have 2 things to display to the player at the same time (same trigger cycle) because you are overwriting the information.
    The difference is that you don't set a value, you add a value and later on you subtract the values which results in multiple displayable messages at once, but which is a little bit more difficult to understand.




    Dec 31 2010, 3:00 pm Gigins Post #12



    That's actually easy to counter, just place messages that could overlap on another DC. Like have 2 or 3 lists instead of one. Like, 1st for kills to cash messages, 2nd for mission briefings and stuff, 3rd for anything else you want to show the player. :rolleyes:



    None.

    Jan 1 2011, 1:29 am Ashura Post #13



    Quote
    Else you can still use Gigin's method[/color] (which is basically what my second method was, just much better explained). You only would have some information loss, if you have 2 things to display to the player at the same time (same trigger cycle) because you are overwriting the information.
    The difference is that you don't set a value, you add a value and later on you subtract the values which results in multiple displayable messages at once, but which is a little bit more difficult to understand.

    Hmmm you mean if like I want 2 messages to display so for the first one I use the Condition Set and use Clear on the second one ? Correct ?

    Oh I sent the map to you btw pls check it out.



    None.

    Jan 1 2011, 7:00 am rockz Post #14

    ᴄʜᴇᴇsᴇ ɪᴛ!

    since you're using ahli's method:
    trigger 1:
    C: switch 1 is set
    A:
    -clear Switch 1

    trigger 2:
    C: -whatever
    A:
    -set Switch 1
    -preserve trigger

    stick the trigger 1 on player 8, who should be a computer. it will always run last.

    Gigins' method is best though, since you can also just use binary to display stuff. Note that this isn't for you Ashura, but for the other people in the thread who may search this in the future, or already know about binary countoffs but never thought to apply them in this way.
    have one text display when the DC is exactly 1, another on DC 2-3 and then subtract 2, another on DC 4-7 and subtract 4, another on DC 8-15 and subtract 8, another on 16-31, etc... If you put the big numbers first, they'll all display at the same time. If you put the big numbers last, then they'll display one at a time, one per trigger cycle.

    You can store up to 31 different texts on one DC that way. There's no way you could have more than 31 things which could possibly happen at the same time, so it's better to have another DC which keeps any storyline stuff on the exactly 2, 3, 4, etc... method, since you can have 2^31 texts stored on the same DC (I'm purposefully avoiding negative numbers here).



    "Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

    Jan 1 2011, 10:27 am Ashura Post #15



    Wait which one is used to display the text trigger 1 or trigger 2 ?

    -----------------

    edited. I tried changing that but its not working even though I sticked Player 8 in Trigger 1 or chose All Players.

    The text only appeared to Player 1. Nothing came up for Player 2 but they did the actions from trigger 2 though just missing the text. Please help :-(

    It seems that the text can only be display to only one player who is the first which trigger see.

    Post has been edited 2 time(s), last time on Jan 1 2011, 10:56 am by Ashura.



    None.

    Jan 1 2011, 11:08 am Ashura Post #16



    Quote from Gigins
    I usually have lots of various messages I want to show to all players including sounds and stuff. I've made up a nice message system for my maps. It use 1 Death Counter(DC) which can show almost infinite number of messages and sounds to all or chosen players. Here is what I do.
    1) rename an unused unit to "msg#" or something, we'll rename it to "DC".
    2) make a list of messages on paper or in notepad. like DC1 "random text1"; DC2 "random text with sound"; DC3 "random text2" and so on. You can populate the list during making the map, you don't have to make it all up instant.
    3) Make a trigger for each message.
    Trigger
    Players
  • All Players
  • Conditions
  • Current player suffers exactly 1 deaths of DC
  • Actions
  • Set deaths for current player to 0 of DC
  • Display text message
  • Preserve trigger

  • Trigger
    Players
  • All Players
  • Conditions
  • Current player suffers exactly 2 deaths of DC
  • Actions
  • Set deaths for current player to 0 of DC
  • Display text message
  • play sound
  • Preserve trigger


  • Now every message and/or sound has a different number on your list. To display text/play sound of the 10th message of your list to all players, have a trigger with these actions.
    Trigger
    Players
    None specified.
    Conditions
    None specified.
    Actions
  • Set deaths of DC to 10 for all players

  • To display the 4th message of your list to Force1 have this in your trigger.
    Trigger
    Players
    None specified.
    Conditions
    None specified.
    Actions
  • Set deaths of DC to 4 for Force1


  • With this you can display any text or sound any time to anyone in the game. Good luck!
    Ummm so let get this straight if I'm using this method that's means I need to have enough unused units in my map so that all messages can be display right ? And can i use building instead ?

    --------------------------
    edited. WAIT I tried this method and fortunately IT WORKED !!!
    The text showed to both player no problem. And I understand now that you only need 1 unit then just set the amount of death of it. THX VERY MUCH MAN UR LIFE SAVER ! I SPENT ALL NEW YEAR NIGHT TESTING ON THIS CRAP AND FINALLY IM A HAPPY MAN AGAIN. THX To Ya Gigins ! :D :lol: :lol: :lol: :lol: :lol:

    Post has been edited 1 time(s), last time on Jan 1 2011, 11:20 am by Ashura.



    None.

    Jan 1 2011, 2:21 pm Gigins Post #17



    Glad to help you out! Happy new year! ^^



    None.

    Jan 1 2011, 8:08 pm rockz Post #18

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Note there are 228 possible death counters you can use, and around 100 of them will always be unkillable in game (start location, alan turret, beacons, etc...) and thus unused.



    "Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [11:05 pm]
    Ultraviolet -- :wob:
    [03:55 pm]
    Zoan -- :wob:
    [10:34 am]
    NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
    [2024-5-18. : 3:45 am]
    Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
    [2024-5-17. : 6:47 am]
    NudeRaider -- lil-Inferno
    lil-Inferno shouted: nah
    strong
    [2024-5-17. : 5:41 am]
    Ultraviolet -- 🤔 so inf is in you?
    [2024-5-17. : 4:57 am]
    O)FaRTy1billion[MM] -- my name is mud
    [2024-5-17. : 4:35 am]
    Ultraviolet -- mud, meet my friend, the stick
    [2024-5-16. : 10:07 pm]
    lil-Inferno -- nah
    [2024-5-16. : 8:36 pm]
    Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
    Please log in to shout.


    Members Online: RIVE, Roy