• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Why does the game refuse to recognize my tags?

Black_Wolf

Active member
Context: i made two different buffs, which i want to apply when the player is attached to a specific entity (in this case, a vehicle).

I've been bashing my head against the wall for days since the game simply refuses to give me the correct buff, it either gives me both, or gives me none based on the varius requirements i tried giving it.

Can anyone tell me what i'm doing wrong? Or is this just not possible?

This is the base code that should work. I removed any of my failed experiments where i added a bunch of requirements.

P.S: yes, i did append my tag in an entityclass file.

<effect_group>
<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffVehicleWithAC"/>
<requirement name="IsAttachedToEntity" tags="bwhasroof"/>
</effect_group>

<effect_group>
<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffVehicleNoRoof"/>
<requirement name="IsAttachedToEntity" tags="bwnoroof"/>
</effect_group>

<effect_group>
<requirement name="!IsAttachedToEntity"/>
<requirement name="HasBuff" buff="buffVehicleWithAC"/>
<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffNoLongerInVehicle"/>
<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffVehicleWithAC"/>
</effect_group>

<effect_group>
<requirement name="!IsAttachedToEntity"/>
<requirement name="HasBuff" buff="buffVehicleNoRoof"/>
<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffNoLongerInVehicleNoRoof"/>
<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffVehicleNoRoof"/>
</effect_group>


Pls halp

 
Last edited by a moderator:
Try changing your first two groups to something like this:

            <triggered_effect trigger="onSelfBuffUpdate" action="GiveExp" exp="10000">
                <requirement name="CVarCompare" cvar="_expdeficit" operation="GTE" value="10000"/></triggered_effect>




Don't close out the trigger node until after the requirement, so the game knows how to apply your triggers.

 
Try changing your first two groups to something like this:

            <triggered_effect trigger="onSelfBuffUpdate" action="GiveExp" exp="10000">
                <requirement name="CVarCompare" cvar="_expdeficit" operation="GTE" value="10000"/></triggered_effect>




Don't close out the trigger node until after the requirement, so the game knows how to apply your triggers.
Thank you, mate!

I did so but unfortunately, both of the buffs apply whether i'm on a vehicle with hasroof or noroof tags...

Code:
	<effect_group>
		<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffVehicleWithAC">
		<requirement name="IsAttachedToEntity" tags="bwhasroof"/></triggered_effect>
	</effect_group>
	
	<effect_group>
		<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="buffVehicleNoRoof">
		<requirement name="IsAttachedToEntity" tags="bwnoroof"/></triggered_effect>
	</effect_group>
 
Back
Top