Bladestorm Games Posted October 3, 2021 Share Posted October 3, 2021 Hello everyone, I am trying to attempt/theorize a Poison debuff that applies damage over time. I am using the Bleeding debuff as a guide on how to make a Poison version of the Bleed debuff. The question I have is, if I change this code: <triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInjuryBleeding"> <requirement name="CVarCompare" cvar="$bleedDuration" operation="LTE" value="0"/> </triggered_effect> To this: <triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffPoisonDoT"> <requirement name="CVarCompare" cvar="$poisonDuration" operation="LTE" value="0"/> </triggered_effect> will the CVar of "poisonDuration" function? Or does it fail, because I havent declared a poisonDuration variable in some other file? I hope the question I'm asking makes sense, basically I'm replacing vars like "bleedDuration" and "bleedCounter" with "poisonDuration" and "poisonCounter" but I'm wondering if that would even work or would it fail because I need to declare those variables somewhere first? Link to comment Share on other sites More sharing options...
bdubyah Posted October 3, 2021 Share Posted October 3, 2021 buffInjuryBleeding has a pretty good example of this. BleedCounter is applied either from the item or perks, such as perkDeepCuts. But you could set your counter a few different ways. It basically controls the HP lost in this situation, in conjunction with bleedAmount. There's a bit to it, but you can follow it in that buff. So look at buffInjuryBleeding and compare it with perkDeepCuts and that should give you good idea of how it all works. 1 Link to comment Share on other sites More sharing options...
Bladestorm Games Posted October 3, 2021 Author Share Posted October 3, 2021 8 minutes ago, bdubyah said: buffInjuryBleeding has a pretty good example of this. BleedCounter is applied either from the item or perks, such as perkDeepCuts. But you could set your counter a few different ways. It basically controls the HP lost in this situation, in conjunction with bleedAmount. There's a bit to it, but you can follow it in that buff. So look at buffInjuryBleeding and compare it with perkDeepCuts and that should give you good idea of how it all works. I've looked at both buffInjuryBleeding and perkDeepCuts, and understand how they function, but my question was more of whether I need to assign/initialize custom variables someplace first, before using them, since "poisonDuration" and "poisonCounter" are not actually in the game, I'm just curious if I need to initialize them someplace first before using them. I want to note here that I dont want to use the bleed variables(bleedAmount, bleedCounter, etc) in the poison debuff code, because Im sure if an enemy is poisoned and bleeding, there will be issues with sharing similar variables. Link to comment Share on other sites More sharing options...
bdubyah Posted October 3, 2021 Share Posted October 3, 2021 No, you just use whatever. No need to initialize them. They will just work. 1 Link to comment Share on other sites More sharing options...
khzmusik Posted October 15, 2021 Share Posted October 15, 2021 On 10/3/2021 at 7:18 PM, bdubyah said: No, you just use whatever. No need to initialize them. They will just work. As a follow-up: If you set a cvar to zero it will disappear - it's the same as removing it altogether. You can see cvars and buffs by pressing F3 in game, then selecting "ply" in the window that pops up. If you have set a cvar to zero, you will not see it in the list. 1 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