Text Messages - Customizing....

  • Thread starter Thread starter FalconWest
  • Start date Start date
F

FalconWest

Guest
Text messages and other questions!

I have been trying to get this to work, and so far I couldn't find any tutorial on this either. Anyway, here are the problems:

1 - How to set a message with [Player's Nickname] on it? Something like: "[Dead Hero's Player] just got owned by [Killer Hero's Player]!" - Then which codes should I use so the nicknames of each player will appear on those parts? As well as their respective colors? (DotA like?)

2 - How can I remove the standard hero death text? [Rexxar the Beastmaster has fallen]. I tried looking for the text value in the gameplay interface menu but I couldn't find it. Any ideas?

Thanks.
 
1:

Actions = Display to all players the text ((name of (owner of (dying unit)))+(just got owned by))+((name of (owner of (killing unit))))

Hope this helps.

~Jindo
 
Excellent! Its impressive how many ways there are to achieve the same effect in the World Editor tool. Any idea how to apply the player's respective color to their names in the message? Or that already happens?

Thanks again! :)
 
Here are a few more questions:

1 - How to add each player's respective colors to text messages? (As mentioned above)

2 - How can I remove the standard hero death text? [Rexxar the Beastmaster has fallen]. I tried looking for the text value in the gameplay interface menu but I couldn't find it. Any ideas?

Some questions regarding hero spawning:

3 - There are 10 spawning locations. When the player picks a hero (classic wisp hero selector setup), I'd like them to randomly spawn at these locations, never having two players spawning at the same place. How is this done?

4 - How to ping the location of all heroes on the map, excluding self, every X seconds?
 
1.

|cffff0000Name|r and the "name" will be in red.
There's a list of the color codes, or, at least, a link to the list, somewhere in this forum.
Some search might find it.

2.

Stats - Hero - Hide hero death message = true

3.

Make sure every location is only ever used once.

Put them all in some array,
then get some inspiration from the "Non-repeating random sequence" post in the Free Trigger Code thread.

4.

Why exclude yourself?
 
AceHart said:
1.

|cffff0000Name|r and the "name" will be in red.
There's a list of the color codes, or, at least, a link to the list, somewhere in this forum.
Some search might find it.

2.

Stats - Hero - Hide hero death message = true

3.

Make sure every location is only ever used once.

Put them all in some array,
then get some inspiration from the "Non-repeating random sequence" post in the Free Trigger Code thread.

4.

Why exclude youself?
1 - Wouldn't that always make the name red? Isn't it possible to apply the player's respective color to it? (DotA-like?)

2 - Excellent.

3 - I'm not quite familiar with the scripts yet, specially about the variables and arrays stuff. I'll take a look at the post you mentioned.

4 - Because its just stupid to ping yourself. I mean, you know where you are right? Also, is it possible to ping each player's hero with their respective colors? (Blue's hero is pinged in the minimap with a blue ping).

Thanks! :)
 
1.

Somewhere at the beginning of your map, prepare a couple variables with the names and the colors of the players.
PlayerRedName = |cffff0000 + name of (player 1 red) + |r
PlayerBlueName = |cff00ff00 + name of (player 2 blue) + |r
...

Then use those as "name" when needed.


4.

Well, yes, sort of...
However, the triggering gets much simpler if you ping all of them.
 
1. Look at the color codes tutorial, there are links given to help if there aren't colours that are required.

4. i dont know how to do this but i will attempt :P.

Code:
Events:
 Every 5.00 seconds of game time.
[i]no conditions[/i]
Actions:
 Pick every player in (allies of self (i think)) and do (Pick every unit in (units owned by picked player) and do (ping minimap at (position of (picked unit))

repeat action and change pick every player to enemies of self.

i dont have world editor open right now so i dont know precisely what the function's options are when you click on them, i think ping minimap is under cinematic though.

Hope this helps ;)

~Jindo
 
Code:
PingHeroes
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units owned by (Player((Integer A))) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
                    Loop - Actions
                        For each (Integer B) from 1 to 12, do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Integer A) Not equal to (Integer B)
                                    Then - Actions
                                        Cinematic - Ping minimap for (Player group((Player((Integer B))))) at (Position of (Picked unit)) for 1.00 seconds, using a Simple ping of color (Colors_Red[(Integer A)]%, Colors_Green[(Integer A)]%, Colors_Blue[(Integer A)]%)
                                    Else - Actions

Pings every Hero in the color of it's owner for everyone except the owner.
Or, at least, I do guess so... totally untested.

Also assumes that your map uses every player from "player 1" to "player 12".
If it's less, change the "12" accordingly.
Then again, it's no problem to send a ping to a computer player... :)

Run time beheavior? No idea...
Like I said, this trigger could be greatly simplified if you pinged every Hero for everyone,
and without any specific color.

Of course, if it works, it's sorta cool :cool:

Colors_Red is an array of type "real" (size 12), same for green and blue,
and filled in with the colors of the players.

Colors_Red[ 1 ] = 100,00
Colors_Green[ 1 ] = 0.00
Colors_Blue[ 1 ] = 0.00

Colors_Red[ 2 ] = 0,00
Colors_Green[ 2 ] = 100.00
Colors_Blue[ 2 ] = 0.00

For every player.

Note: FF (255) = 100%, CC (204) = 80%.

Good luck ;)
 
Very nice indeed! I'll implement these to the map as soon as possible and will report back!

Thanks :)
 
On second thought:

Code:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
    Loop - Actions
        Set tmpInteger = (Player number of (Owner of (Picked unit)))
        Cinematic - Ping minimap for (All enemies of (Owner of (Picked unit))) at (Position of (Picked unit)) for 1.00 seconds, using a Simple ping of color (Colors_Red[tmpInteger]%, Colors_Green[tmpInteger]%, Colors_Blue[tmpInteger]%)

:)
 
AceHart said:
On second thought:

Code:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
    Loop - Actions
        Set tmpInteger = (Player number of (Owner of (Picked unit)))
        Cinematic - Ping minimap for (All enemies of (Owner of (Picked unit))) at (Position of (Picked unit)) for 1.00 seconds, using a Simple ping of color (Colors_Red[tmpInteger]%, Colors_Green[tmpInteger]%, Colors_Blue[tmpInteger]%)

:)
The first one didn't work and don't ask me why :confused:
Also, could you elaborate the colors part? I didn't quite understand how its ment to be done... (tmpInteger, Colors_Red, what?) :confused:
 
I'd suggest you try it first with "100, 100, 100" as color.
Once you get some ping, it's time to "worry" about the actual color.


Code:
ff0000	red
0000ff	blue
00ffff	teal
800080	purple
ffff00	yellow
ff8000	orange
00ff00	green
ff00ff	pink
808080	gray
0080ff	light blue
008000	dark green
800000	brown
000000	black

AFAIK, those are the default player colors.
+15 rep for anyone that can verify those!

Now, "pings" need three parts, red, green and blue.
Example, for "orange", ff8000, that means red = ff, green = 80 and blue = 00.

Or, in %, FF = 100, 80 = 0, 0 = 0.

Then "player number" is just that, it's 1 for player 1, 5 for player 5...

Setting it all up:
Red is player 1, so the Colors_Red[1], Colors_Green[1] and Colors_Blue[1] need to be filled with the color parts of player 1.
Same for all the other players.
See example in previous post (Use "set variable" to do so).

But, like I said, first get the pings up and running, then worry about color.
 
Ah! It works! At last! The pinging system is nearly complete. Now if only I knew how to apply the appropriate colors to each ping... :D

Thanks for the help so far AceHart and Jindo :)
 
If what AceHart and Jindo have been saying isn't making sense for you, try looking at it this way - change what AceHart said (This):
Code:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
    Loop - Actions
        Set tmpInteger = (Player number of (Owner of (Picked unit)))
        Cinematic - Ping minimap for (All enemies of (Owner of (Picked unit))) at (Position of (Picked unit)) for 1.00 seconds, using a Simple ping of color (Colors_Red[tmpInteger]%, Colors_Green[tmpInteger]%, Colors_Blue[tmpInteger]%)
To this:
Code:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
    Loop - Actions
        Set tmpInteger = (Player number of (Owner of (Picked unit)))
        Cinematic - Ping minimap for (All enemies of (Owner of (Picked unit))) at (Position of (Picked unit)) for 1.00 seconds, using a Simple ping of color (Player color (convert player number to player - player (tmpinteger)))
This is what it does - instead of going to each player and pinging every other player for him, it goes to each player and pings him for every other player. For example, if tmpinteger were 1, then the player selected would be Player 1 (Red). Instead of pinging the locations of blue, teal, purple, yellow, etc etc for Red, it pings the location of Red for blue, teal, purple, yellow, etc, and it pings with Red's color.

P.S. AceHart that's a really smart way of looking at the problem :)
 
I'm trying to mess around with the options but no luck so far.
How come I still can't understand this... :(
 
I'll try to explain how the trigger works, step by step. This is the action part that I'm explaining:

"Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)" <<This line picks every hero on the map, and does (Actions) with them. The reason it takes heroes is because what it's really trying to do is find out (a) where the hero is, and (b) who owns the hero. For example, it would do (Actions) with Red's Knight hero, Blue's Archer hero, Teal's sorceress hero, etc etc.

"Loop - Actions" <<This shows that the actions following it will be looped (done repeatedly) for the above statement. The above statement is the Unit Group statement. What this essentially means is that for each hero that the Unit Group statement finds, this Loop does the following Actions. So if the Unit Group statement finds 5 heroes, then the Loop does the Actions 5 times, one time for each hero.

"Set tmpInteger = (Player number of (Owner of (Picked unit)))" <<This sets a temporary integer (an integer variable) as the number of each player. Each player has a number (Red is 1, Blue is 2, Teal is 3... ...Brown is 12). tmpInteger saves the number of the player who owns the hero that the Unit Group statement finds. For example, if the Unit Group statement finds Red's Knight hero, then this 'Set tmpInteger' statement saves the number of Player Red (which happens to be 1). The 'tmpInteger' variable is set to a new number every time the Loop does the actions. It's not 100% necessary, but it makes life easier. (If you don't understand about variables/integers just say so and I'll explain them).

The next line I'll break into bits.

"Cinematic - Ping minimap" <<You understand this part, it pings the minimap. The part that comes after it tells the Cinematic function who to ping the map for (will be explained on the next line).

"for (All enemies of (Owner of (Picked unit)))" <<This is who sees the pings (who the Cinematic function pings the map for). This is essentially another Loop which says to Ping the Minimap for every player who is an enemy of the currently selected Hero (the Hero selected by the Unit Group statement). However, since you can't ping for enemies of a Unit, you can only ping for enemies of a Player, the "Owner of (Picked unit)" line is necessary to tell the Cinematic action who owns the picked unit. This tells it who's enemies it has to ping the map for.

"at (Position of (Picked unit)) for 1.00 seconds" <<This tells the Cinematic action where it needs to ping the minimap, and for how long it needs to ping it. "Position of (Picked unit)" is the place where the currently selected Hero is (this is the Hero who the Unit Group statement found). "for 1.00 seconds" is how long the Cinematic action needs to ping the minimap - for 1 second.

"using a Simple ping" <<This just means a regular ping, the kind that you can make in a game.

"of color (Player color (convert player number to player - player (tmpinteger)))" <<This tells the Cinematic action what color the ping has to be. What you want to do is ping the minimap with the color of the Player who owns the Hero which is currently selected. If you remember, the "Set tmpInteger" statement saved the number of the Player who owns the Hero. There is a 'Player color' option on the scroll list, and that is what you want to use. However, there is a slight problem, as I'm certain you've noticed. The Player Color options needs the Player itself, not the number of the player. The only thing that we stored was the number of the player, not the player itself. To fix this problem, we have to do a conversion - we have to convert the player number back into the player. To do this you go to the options list and select player conversion - player number. This then converts the saved number (tmpInteger) back into a player.



>>This code only pings enemies of a player. If you want to ping allies as well, then copy the last line and change "enemies of player" to "allies of player".

Hope that helped :D
 
ShaiTan-Enk said:
"of color (Player color (convert player number to player - player (tmpinteger)))" <<This tells the Cinematic action what color the ping has to be. What you want to do is ping the minimap with the color of the Player who owns the Hero which is currently selected. If you remember, the "Set tmpInteger" statement saved the number of the Player who owns the Hero. There is a 'Player color' option on the scroll list, and that is what you want to use. However, there is a slight problem, as I'm certain you've noticed. The Player Color options needs the Player itself, not the number of the player. The only thing that we stored was the number of the player, not the player itself. To fix this problem, we have to do a conversion - we have to convert the player number back into the player. To do this you go to the options list and select player conversion - player number. This then converts the saved number (tmpInteger) back into a player.
The problem is in this part. The ping script already works - All enemy players are pinged on the minimap. The real problem is the color setup.

"(Player color (convert player number to player - player (tmpinteger)))" I really can't find a "Player Color" option on the scroll list, unless I'm looking at the wrong place. Also, the now-famous tmpInteger would be a variable of type Integer (Size? Initial Value? Array? Variables are the gates to hell for me).

Thanks for the help so far! :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    How often does the Trending Content box refresh?
  • The Helper The Helper:
    Also, in the last template there was a seperation between sticky threads and regular threads in the forum
  • Ghan Ghan:
    Not sure. It's probably part of a cron job.
  • The Helper The Helper:
    Hey Ghan, whatever cron job its part of its not running its been the same for days. If it does not work can we remove it?
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top