Hello!
So, I learned how to kill a soldier without showing a message "X killed by X". ⇒ I can display my own message about the death of a soldier. But standard messages about the death of a soldier are output in a certain color. I do not know this color. And I need to know this color.
In details. I need the following:
Screen with messages of death:
There is a message on the screen:
Stadtlicher Infanterist died from bleeding! (blue)
I display this message using display_message.
And I need the color of this message to be the same as the color of the message "Halbbruder killed by Piechur Strelczy"
To display the message, I use the following code:
So, I learned how to kill a soldier without showing a message "X killed by X". ⇒ I can display my own message about the death of a soldier. But standard messages about the death of a soldier are output in a certain color. I do not know this color. And I need to know this color.
In details. I need the following:
Screen with messages of death:
There is a message on the screen:
Stadtlicher Infanterist died from bleeding! (blue)
I display this message using display_message.
And I need the color of this message to be the same as the color of the message "Halbbruder killed by Piechur Strelczy"
To display the message, I use the following code:
Code:
(le, ":hp", 0),
(try_begin),
(agent_is_ally, ":agent_no"),
(try_begin),
(get_player_agent_no, ":player_agent_no"),
(agent_get_team, ":team_agent", ":agent_no"),
(agent_get_team, ":team_player", ":player_agent_no"),
(team_get_leader, ":leader_of_team_agent", ":team_agent"),
(this_or_next|eq, ":team_agent", ":team_player"),
(eq, ":leader_of_team_agent", ":team_player"),
(assign, ":color", 0x6600FF), #my soldier died
(else_try),
(assign, ":color", 0xFF1100), #ally soldier died
(try_end),
(else_try),
(assign, ":color", 0x00FFFF), #enemy soldier died
(try_end),
(set_show_messages, 0),
(agent_deliver_damage_to_agent, ":agent_no", ":agent_no", 100),
(set_show_messages, 1),
#(agent_fade_out, ":agent_no"),
(str_store_troop_name, s1, ":troop"),
#(display_message, "@{s1} bled to death!", 0x660000),
(display_message, "@{s1} died from bleeding!", ":color"),