Black_Wolf Posted December 20, 2023 Share Posted December 20, 2023 (edited) 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 Edited December 20, 2023 by Black_Wolf (see edit history) Link to comment Share on other sites More sharing options...
BFT2020 Posted December 20, 2023 Share Posted December 20, 2023 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. Link to comment Share on other sites More sharing options...
Black_Wolf Posted December 20, 2023 Author Share Posted December 20, 2023 2 hours ago, BFT2020 said: 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... <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> 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