Zavar Posted May 14, 2022 Share Posted May 14, 2022 Hello all, I hope everyone is well. Is there a macro that returns the key name for the damage source? Not sure I'm explaining it properly, {{c:dmg}} returns the color value, is there a macro that instead returns the key name, similar to how {{sys-color-key}} returns the key name and {{c:system}} returns the color value? Thanks for any help, Zavar @ Quote Link to comment Short link Share on other sites More sharing options...
Kurzdor Posted May 15, 2022 Share Posted May 15, 2022 Hey there. If I understand you well the {{c:dmg-kind}} should help you. Also res_mods\mods\shared_resources\xvm\doc\macros.txt: Quote │ D │ {{dmg-kind}} │ │ │ │ │ X │ │ damage kind (attack, fire, ramming, ...) │ D │ {{dmg-kind-key}} │ │ │ │ │ X │ │ damage kind table key value (shot, fire, ramming, ...) │ D │ {{c:dmg}} │ │ │ │ │ X │ │ color depending on damage source │ D │ {{c:dmg-kind}} │ │ │ │ │ X │ │ color depending on damage kind @ Quote Link to comment Short link Share on other sites More sharing options...
Zavar Posted May 15, 2022 Author Share Posted May 15, 2022 It's similar, but not what I was looking for. My understanding is that {{c:dmg-kind}} returns the actual color assigned in colors.xc for the dynamic color by damage kind, i.e. from the dmg_kind: shot, fire, ramming, etc. The {{dmg-kind-key}} returns that actual key name that is being applied for the damage kind instead of the color. I'm looking for the equivalent for the {{c:dmg}} which is based on the damage source i.e. alley, enemy, etc. and returns the color (i.e. ally_enemy_hit -> red). I want an equivalent function say {{dmg-source-key}} to return the key, not the color, so if an alley is shooting and hits an enemy it should return alley_enemy_hit. @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted May 19, 2022 Share Posted May 19, 2022 Added macro {{dmg-color-key}}. 2 @ Quote Link to comment Short link Share on other sites More sharing options...
Zavar Posted May 19, 2022 Author Share Posted May 19, 2022 Thank you very much for adding this in ktulho!!! @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.