Jump to content

Adding delay to consuming an ingestible


velfinger

Recommended Posts

Hi all,

 

I want there to be a delay between using Jet and experiencing its effects. The idea was to use "begin OnMagicEffectHit" with a dummy effect to fire off the script attached to Jet. Then call a timer function for x seconds followed by "player.cios JetDuplicate". To check whether the script starts I tried:

 

scn whatever

begin OnMagicEffectHit JetDummyEffect

rewardxp 10

end

 

Still, when I take Jet the script doesn't start. Is there a better alternative?

Thanks in advance.

Link to comment
Share on other sites

Im not sure if "Begin OnMagicEffectHit" will work with a consumable like that , there seems to be a lack of info for that begin block.

 

But what I found does work , albeit kind of convoluted , and I'm sure there is a better way.

 

Is to make a base effect , Script type .

Then attach an Effect script to it like this for example ...

 

~~~~~~~~

SCN zzzJetDelayScript
Begin ScriptEffectStart
ShowMessage zzzJetDelayMessage
End
Begin ScriptEffectFinish
PlayerRef.CIOS zzzJetEffect
ShowMessage zzzJetActiveMessage
End
~~~~~~~~~~~
Then on the Jet consumable ... remove the "ChemIncAPJet" and replace it with your new base effect with the script.
And for the timer delay , you just input how long you want it to delay in the duration on the consumable / effect item.
Plus you create a new Actor Effect matching what the Jet consumable had for duration and magnitude using "ChemAPJet"
The only down side I see with this method , is there is no way to show that the Jet effect has expired , like they do on the consumable. Except to notice your AP is now back to normal. But I guess you could put a visual effect on the "ChemIncAPJet" base effect , that you would notice is no longer there when the actor effect duration expires.
If this is a mod just for yourself , messing with vanilla objects is usually not to detrimental. But if this is a mod you plan on publishing for download. I would suggest looking into how to do this with an Event Handler.
Sorry I can't be much help with that.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...