Text Messages - Customizing....

  • Thread starter Thread starter FalconWest
  • Start date Start date
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".

Just keep one line, and use "all players". Computer players don't mind map pings.


ShaiTan-Enk said:
There is a 'Player color' option on the scroll list

No, there isn't.
Actually, there's only two "ping" statements.
One without any color, and one that wants the color as a percentage of red, green and blue.
There isn't one that takes one single color.

Now, since you did find it, hm... you're using WEU? Me not.

"Normal" mappers, like myself (yeah, sure :)), will have to use a couple arrays with R, G and B separeted.
And we also have to figure out the player colors by ourselves, hence the list I posted.

As for the original poster, you will either have to get WEU, since it seems to have a different ping statement and a way to just ask a player what color he has.
Or, you go with the array way I proposed, in which case you'll have to tell us what part exactly of the array setup isn't clear enough yet.
 
AceHart said:
Or, you go with the array way I proposed, in which case you'll have to tell us what part exactly of the array setup isn't clear enough yet.
The whole part of the array! You see, variables are like hell breaking loose to me. Perhaps if I knew how many variables (Type, array, initial value, etc) I had to set up I might have understood. Damn never thought this could be so difficult!

:confused: :confused:
 
Difficult? Naw... only your first couple hundred triggers are.
After, it gets simpler :)

So, Variable Editor (yellow "X), New Variable (green "X"),
Name: Colors_Red
Type: Real
Check "Array"
Put 13 as "size".
No default value needed
Confirm with "Ok".

Repeat with "Colors_Green" and "Colors_Blue". Settings are the same as above. Only the name changes.

You do have a trigger with the event "Map Initialization"?
If not, just make one with that event.

Then you'll need to add a somewhat largish list of "Set Variable" actions.

Here's a list with the first 13 colors, in percents:

Code:
Set Colors_Red[1] = 100.00
Set Colors_Green[1] = 0.00
Set Colors_Blue[1] = 0.00
Set Colors_Red[2] = 0.00
Set Colors_Green[2] = 0.00
Set Colors_Blue[2] = 100.00
Set Colors_Red[3] = 0.00
Set Colors_Green[3] = 100.00
Set Colors_Blue[3] = 100.00
Set Colors_Red[4] = 50.00
Set Colors_Green[4] = 0.00
Set Colors_Blue[4] = 50.00
Set Colors_Red[5] = 100.00
Set Colors_Green[5] = 100.00
Set Colors_Blue[5] = 0.00
Set Colors_Red[6] = 100.00
Set Colors_Green[6] = 50.00
Set Colors_Blue[6] = 0.00
Set Colors_Red[7] = 0.00
Set Colors_Green[7] = 100.00
Set Colors_Blue[7] = 0.00
Set Colors_Red[8] = 100.00
Set Colors_Green[8] = 0.00
Set Colors_Blue[8] = 100.00
Set Colors_Red[9] = 50.00
Set Colors_Green[9] = 50.00
Set Colors_Blue[9] = 50.00
Set Colors_Red[10] = 0.00
Set Colors_Green[10] = 50.00
Set Colors_Blue[10] = 100.00
Set Colors_Red[11] = 0.00
Set Colors_Green[11] = 50.00
Set Colors_Blue[11] = 0.00
Set Colors_Red[12] = 50.00
Set Colors_Green[12] = 0.00
Set Colors_Blue[12] = 0.00
Set Colors_Red[13] = 0.00
Set Colors_Green[13] = 0.00
Set Colors_Blue[13] = 0.00

Note, you can just type in the first 3, then select those (ctrl + click),
then use copy,
select the last one, and just paste it back in several times.
After that, just edit to put the correct numbers.

Good luck :)
 
Its done! Now, how am I to associate these variables to the cinematic pinging trigger? There shall be multiple instances of the trigger, say, one for each player?

EDIT: I saw in your previous posts you referred the [1]...[12] after the colors as [tmpInteger]. Yet another variable! Possibly to refer to each player accordingly? If so, then what kind of variable would it be? (Array? Size? OMG!)

Thanks for the help so far... its almost done! :D
 
Done? You typed that list in in less than 20 minutes? :cool:


Did you type in the trigger from up here?

It says:
...using a Simple ping of color (Colors_Red[tmpInteger]%, Colors_Green[tmpInteger]%, Colors_Blue[tmpInteger]%)


Now, there isn't a need to do several instances, the trigger as posted already works for every player.
Unless, you would have some new or additional idea?


For completeness, here it is one more time:

Code:
PingHeroes
    Events
        Time - Every 20.00 seconds of game time
    Conditions
    Actions
        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]%)


tmpInteger:

Name: tmpInteger
Type: Integer
No array, no size, no default value... no nothing really. Just a name and a type.
 
It did not work. Damn, after all the work :(
Any ideas why? Perhaps I'm missing something... although I'm sure I followed all the instructions.

Code:
Periodic Hero Ping
    Events
        Time - Every 20.00 seconds of game time
    Conditions
    Actions
        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 PingInteger = (Player number of (Owner of (Picked unit)))
                Cinematic - Ping minimap for (All enemies of (Owner of (Picked unit))) at (Position of (Picked unit)) for 4.00 seconds, using a Simple ping of color (Colors_Red[tmpInteger]%, Colors_Green[tmpInteger]%, Colors_Blue[tmpInteger]%)
 
I think I'll jump in.
Well, this bit of code seems to make heavy use of variables and arrays to accomplish its goal (probably the best way as well). There are alot of places where it could go wrong and seeing (from your previous posts) that you don't quite fully understand how they all (variables/arrays) interact, you've done well to make it so far, so I wouldn't feel discouraged =]

If you'd like I could give you a brief run down on arrays/variables and how/why to use them =]
(Yes, I'm a computer science geek haha.)

EDIT: I personally think it may have something to do with the action "pick units matching ((matching unit) is a hero equal to True)" Just a hunch.
 
Laika, the problem is that it worked before (without variables in the colors' places), but flashing all pings on white color.

I'm not giving up on this. Any other ideas? The only units each player will have during gameplay are the heroes, so I'm afraid you don't have to check if a unit is a hero or not. Although I think thats not the problem.

Any other ways of implementing colors to each player's ping? Different triggers perhaps? Damn I feel outta place not knowning much about this :D

EDIT:
Main Goal: Ping the minimap for all heroes' locations excluding self and allies, with each ping having its hero's respective color. [e.g. Ping yellow's hero location with a yellow ping, with yellow being an enemy player].
Ways to do it: Probably many. Volunteers? :D
 
Ok, do any pings happen now? Are they wierd colors or something? A little more info on what is happening would be helpful.
 
Laika. said:
Ok, do any pings happen now? Are they wierd colors or something? A little more info on what is happening would be helpful.
Negative. Pings no longer appear with variables set as the colors.
 
Hmm... it could be a typing issue, are those arrays (Color_Red, etc) of type REAL?
 
Laika. said:
Hmm... it could be a typing issue, are those arrays (Color_Red, etc) of type REAL?
Yes sir. Colors_Red, Colors_Green and Colors_Blue are REAL variables, with each having an array of 10 (10 players) and initial value set to default (0).

EDIT: Perhaps theres something wrong with the color values? I set them up as I was told to. Maybe its missing a few colors?

Code:
Hero Ping Dependant
    Events
        Map initialization
    Conditions
    Actions
        Set Colors_Red[1] = 100.00
        Set Colors_Green[1] = 0.00
        Set Colors_Blue[1] = 0.00
        Set Colors_Red[2] = 0.00
        Set Colors_Green[2] = 100.00
        Set Colors_Blue[2] = 0.00
        Set Colors_Red[3] = 0.00
        Set Colors_Green[3] = 100.00
        Set Colors_Blue[3] = 100.00
        Set Colors_Red[4] = 50.00
        Set Colors_Green[4] = 0.00
        Set Colors_Blue[4] = 50.00
        Set Colors_Red[5] = 100.00
        Set Colors_Green[5] = 100.00
        Set Colors_Blue[5] = 0.00
        Set Colors_Red[6] = 100.00
        Set Colors_Green[6] = 50.00
        Set Colors_Blue[6] = 0.00
        Set Colors_Red[7] = 0.00
        Set Colors_Green[7] = 100.00
        Set Colors_Blue[7] = 0.00
        Set Colors_Red[8] = 100.00
        Set Colors_Green[8] = 0.00
        Set Colors_Blue[8] = 100.00
        Set Colors_Red[9] = 50.00
        Set Colors_Green[9] = 50.00
        Set Colors_Blue[9] = 50.00
        Set Colors_Red[10] = 0.00
        Set Colors_Green[10] = 50.00
        Set Colors_Blue[10] = 100.00

Assuming the colors from 1 to 10 are going from red to light blue, of course, but correct me if I'm wrong. It didn't work when it was set up with 13 colors either.
 
Ok, its time for some debug fun =] Here are some things to try, they won't fix the problem but will (hopefully) show you where its going wrong.

I will edit with some ideas for debugging in a moment.

TEXT OUTPUT:
Ok, use the action Game - Display Message (auto-timed) (something like that) to display variable information to you at points within the triggers to help you see whats going on.

--example: Add the line
Code:
Action: Game - Display Message (auto-timed): Message (Color_Red[tmpInteger] + " " + Color_Green[tmpInteger] +  " " + Color_Blue[tmpInteger]) for (Player 1 Red)

after the line where you "set tmpInteger"

also try adding a debug command

Code:
Event: Player 1 Red enters a chat message (!COLORS) as an exact match
Conditions: None
Action: Loop, for integer A from 1 to 10 do the following,
            Game - Display Message (auto-timed): Message (Color_Red[tmpInteger] + " " + Color_Green[tmpInteger] +  " " + Color_Blue[tmpInteger]) for (Player 1 Red)

try using that to see if the variables are correct.

also, trying ditching the multiplayer aspect of the code and try it as a single line

Code:
Action: set tmpInteger = (whatever you want something from  1 to 10)
Action: (not sure of the code, just that line from your current code, and just ping yourself using the color from Color_xxx[tmpInteger])
 
You're using "Set PingInteger",
but the actual ping uses "tmpInteger"...
Use the same variable!


Yes, the color values are in the usual player order, player 1 red, player 2 ...
 
Oh wow... that IS the problem... I feel stupid now XD
(Thats what I get for trying to help at 4am >_>)

EDIT: You don't happen to have the 'create unknow variables used in triggers' option enabled do you? If you do... i'd unselect it, as it makes those problems VERY apparent (it will give you an error on save or test i believe)
 
Laika. said:
You don't happen to have the 'create unknow variables used in triggers' option enabled do you? If you do... i'd unselect it, as it makes those problems VERY apparent (it will give you an error on save or test i believe)

Only if you paste a trigger from one map into another.
He typed it all in himself.

Anyway, I guess that, by now, he was reading post #34 and it's, finally, working?
 
Oh thats too bad... I wish it would disallow running the script with any un declared variables... That would be nice haha.
 
Well true, but it doesn't give you any handy compile (something of the sort) time errors to let you know. =]
That's what I was getting at.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top