ozziefire Posted July 3, 2011 Share Posted July 3, 2011 I have a drink that I am using to trigger the start of a quest when it is consumed. I've tried usin Begin OnEquip and Begin OnOpen with no luck yet.I have the script in the cola drink, but I only want it to activate when it has been drank. I'm suspecting the OnActivate might work but unclear on how it woks after reading the wiki.Any clues on this would be great. Link to comment Share on other sites More sharing options...
KenshinX12 Posted July 3, 2011 Share Posted July 3, 2011 Just use: begin OnActivate What it is talking about, is like if you have nuka-cola and you use it, when you run the begin OnActivate, it will no longer run its normal code block.Like, you won't get the hp healing from it or the decrease in dehydration. Link to comment Share on other sites More sharing options...
rickerhk Posted July 3, 2011 Share Posted July 3, 2011 Remove the script from the ingestibleCreate a base effect with type script, on self.Create an effect script for it and just use the scripteffectStart block - it will run exactly once.Add the base effect to the ingestible with no duration Link to comment Share on other sites More sharing options...
stevie70 Posted July 4, 2011 Share Posted July 4, 2011 Just use: begin OnActivate What it is talking about, is like if you have nuka-cola and you use it, when you run the begin OnActivate, it will no longer run its normal code block.Like, you won't get the hp healing from it or the decrease in dehydration.you can easily get around that with begin OnActivate ; your code activate end this will first run your code and then the objects normal activation.plus, if you're using activate as a script command, you can choose the kind of activation yourself, activate 1 under all circumstances runs your onActivate block, activate 0 under all circumstances runs the normal activation, ignoring any onActivate block. plus you can set the action ref, like activate player 1 runs the objects OnActivate block with the player as the action reference. but anyway, onActivate wouldn't work here, it goes just like rickerhk said. Link to comment Share on other sites More sharing options...
ozziefire Posted July 5, 2011 Author Share Posted July 5, 2011 Remove the script from the ingestibleCreate a base effect with type script, on self.Create an effect script for it and just use the scripteffectStart block - it will run exactly once.Add the base effect to the ingestible with no durationThanks Mate this did a bonza job of fixing it, all is good :) Link to comment Share on other sites More sharing options...
Recommended Posts