Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Action Msg Colours


Xlithan
 Share

Recommended Posts

I decided I wanted a different colour depending on whether you were giving the damage, or receiving the damage whilst in combat with another player or NPC.

I'm not 100% sure, but would I be accurate in saying that there is only 1 line of code for deciding the colour which is displayed when attacking another player/NPC, and that both the attacker and victim will see that same colour?

If so, what would be a good way for showing a different colour depending on if you were the receiver or distributor of the attack?

Thanks.
Link to comment
Share on other sites

If I am understanding your question correctly you are wanting to change the color shown above the head when in combat.

There is more than one code that does this. What you want to do is open up your server.vbp and go to modCombat

Find

```
' Check for a weapon and say damage
SendActionMsg MapNum, "-" & Damage, BrightRed, 1, (MapNpc(MapNum).NPC(MapNpcNum).x * 32), (MapNpc(MapNum).NPC(MapNpcNum).y * 32)
```
In PlayerAttackNpc

and just change BrightRed to the color you want it to show as. This changes the color for "- (damage)" when a player attacks and NPC

to change the color shown when an NPC attacks a player find

```
' Say damage
SendActionMsg GetPlayerMap(Victim), "-" & Damage, BrightRed, 1, (GetPlayerX(Victim) * 32), (GetPlayerY(Victim) * 32)
```
In NpcAttackPlayer. Again change BrightRed to the color you want shown.

Then In PlayerAttackPlayer

Find

```
SendActionMsg GetPlayerMap(Victim), "-" & Damage, BrightRed, 1, (GetPlayerX(Victim) * 32), (GetPlayerY(Victim) * 32)
```
Again BrightRed is the color.

There are 2 SendActionMsg in each of these subs, but I am pretty sure the ones I listed above are the only ones that need to be changed, but if that doesn't work try changing both in each sub.
Link to comment
Share on other sites

What I'm saying, is that in PlayerAttackPlayer, it sends the colour of the action message to every player on the map.

I want the attacker to see yellow, and the receiver to see bright red. I'm not particularly bothered about other players seeing what damage is being done.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...