Xlithan Posted May 23, 2012 Author Share Posted May 23, 2012 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 More sharing options...
kira423 Posted May 23, 2012 Share Posted May 23, 2012 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 modCombatFind```' Check for a weapon and say damageSendActionMsg MapNum, "-" & Damage, BrightRed, 1, (MapNpc(MapNum).NPC(MapNpcNum).x * 32), (MapNpc(MapNum).NPC(MapNpcNum).y * 32)```In PlayerAttackNpcand just change BrightRed to the color you want it to show as. This changes the color for "- (damage)" when a player attacks and NPCto change the color shown when an NPC attacks a player find```' Say damageSendActionMsg GetPlayerMap(Victim), "-" & Damage, BrightRed, 1, (GetPlayerX(Victim) * 32), (GetPlayerY(Victim) * 32)```In NpcAttackPlayer. Again change BrightRed to the color you want shown.Then In PlayerAttackPlayerFind```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 More sharing options...
Xlithan Posted May 24, 2012 Author Share Posted May 24, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now