• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

The counter is not working

Hello. I wrote a mod that counts kills with a specific weapon. To track kills from grounded turrets, I use the following code:

<triggered_effect trigger="onSelfKilledOther" action="ModifyCVar" cvar="CountRoboticsExpert" operation="add" value="1">
<requirement name="HoldingItemHasTags" tags="perkTurrets"/>
<requirement name="ItemHasTags" tags="perkTurrets"/>
<requirement name="!EntityTagCompare" target="other" tags="vehicle"/>
</triggered_effect>

This counter works correctly in local play. However, when using it on a dedicated server, it stops counting if an enemy is killed by a turret placed on the ground.

Could you tell me what this issue is?
 
I realise that this is an older post but for anyone who might read this, when placed, the Turret doesnt fire the onSelfKillOther trigger in multiplayer.
Its one of those elements that never had its code completed before they moved on to something else. So onSelfKillOther works in singleplayer but not for multiplayer turrets.
I found this out after quite a bit of testing for the Learn By Use mod, with Arramus doing the multiplayer testing.
cheers
(edit: to add that the Turret actually becomes another entity when placed, its not the same entity that is in your hand. Firing the turret in your hand will fire the onSelfKillOther in multiplayer)
 
Last edited:
Back
Top