FringeRecall Posted January 3, 2019 Share Posted January 3, 2019 Hi, Been trying to use passive actions without any level of success. I don't see any examples of them in the existing XMLs so it may simply not be possible, however here is what I am trying. <passive_effect target="self" action="CVarLogValue" cvar="MyVariable"/> or <passive_effect target="self" action="ModfyCVar" cvar="MyVariable" value="whatever"/> Thank you. Link to comment Share on other sites More sharing options...
Spider Posted January 3, 2019 Share Posted January 3, 2019 you tick cvars with triggers not passives <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="jz_PlayerFoodAdd" operation="add" value="10"/> Link to comment Share on other sites More sharing options...
FringeRecall Posted January 3, 2019 Author Share Posted January 3, 2019 you tick cvars with triggers not passives <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="jz_PlayerFoodAdd" operation="add" value="10"/> Thank you for your reply. I was afraid that was the only way. I was attempting to set up a buff as a sort-of function with passive actions that way I didn't have to call the same triggered_effects 40 times. Link to comment Share on other sites More sharing options...
Deceptive Pastry Posted January 4, 2019 Share Posted January 4, 2019 Explain in more detail what you're trying to do. Link to comment Share on other sites More sharing options...
FringeRecall Posted January 4, 2019 Author Share Posted January 4, 2019 Explain in more detail what you're trying to do. In buffs.xml, was creating "buffExpAddAxe" that would check the requirements, handle the passive events and add exp to the CVar. On each of the axe's in items.xml, was going to have it simply call the buffExpAddAxe "function" instead of having multiple repeat lines for every type of axe (since for some reason even though some of the other Axe's EXTEND the lower tier Axe's, the triggered_events do not extend.) In short, since the items.xml would handle the triggered_events, I figured it would make more sense if you already knew what was being triggered to passively add the Exp to the CVar without having even more triggered events. Link to comment Share on other sites More sharing options...
Deceptive Pastry Posted January 4, 2019 Share Posted January 4, 2019 I still don't know that I fully understand what you're trying to do, paste some of the code you already have? You can have one triggered_effect to add the buff on onSelfAttackedOther or whatever, then do all the CVar calculations in the buff. <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="MyVariable1" operation="add" value="1"/> <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="MyVariable2" operation="set" value="@MyVariable1"/> <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="MyVariable2" operation="divide" value="1000"/> Some of that is unnecessary but just for example. Then have the passive_effect you're trying to set on the item: <passive_effect name="EntityDamage" operation="perc_add" value="@MyVariable2" tags="pistol,revolver"/> If you're using the same values for each add I'd sooner just add them to each item with "items/item[contains(@name, 'Axe') or contains(@name, 'axe')]/effect_group[@name=Base Effects]". (Case-sensitive so you need both.) Link to comment Share on other sites More sharing options...
FringeRecall Posted January 5, 2019 Author Share Posted January 5, 2019 @Deceptive Pastry, You understood well enough. That's exactly what I was looking for. Thank you kindly Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.