Jump to content

Effects after a waiting period - OnClear or ApplyAtEnd?


Recommended Posts

Creating an effect that happens after another one finishes seems to be pretty complicated.  Obsidian seems to use EventType:OnClear for drug "crashes" after the 180 seconds is over.  Another modder prefers to use ApplicationType:ApplyAtEnd instead, with the EventType being OnApply.  What's the right way to do this?  

Edited by Grape_You_In_The_Mouth
Link to comment
Share on other sites

The Right Way is only getting it to work in game like you want.

 

At the moment you take a drug, there is a "crash status effect" that is applied. This status effect is technically active, but it doesn't tangibly effect the character. However, it does have a further trigger: OnClear. When this event happens (when the positive drug effects end), another status effect is applied. This OnClear event triggers the application of the real "crash status effect" that applies the detrimental crash effects of taking that drug.

 

My further explain felt confusing, so I deleted it. I can help more though.

  • Like 1
Link to comment
Share on other sites

Wow, thanks for confirming this.  I thought I wasn't doing it right but then I realized that it only appears incorrectly, because drug crashes are hidden from the GUI until the OnClear happens.  I did not hide my effects from the GUI, so I see the countdown timer before the OnClear happens, and in the GUI it says the bad effect is already happening---but it's not, it's just the timer.  The timer will describe the bad effects because it's linked to those effects, that is why it is hidden, when Obsidian made drug crashes.  My code was actually working just as intended!

 

What's even worse was that the ability changes Power Levels, which are harder to see in the game (because I'm a big ol' noob).

 

I think you just saved me many many hours of work---I would have re-created my entire ability and it would be incorrect.  I mean wow, thanks man.  You seriously just saved my weekend.

Edited by Grape_You_In_The_Mouth
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...