Difference between revisions of "Adding a script to an ingredient"
Adding a script to an ingredient (edit)
Revision as of 19:01, 13 October 2008
, 19:01, 13 October 2008no edit summary
imported>UDUN m |
imported>UDUN |
||
Line 1: | Line 1: | ||
I wanted to create a piece of poisoned cheese (clone of cheese wedge) with 4 alchemical effects neither of which would be deadly poison - but which when consumed by PC would be like a poisoned apple - bye bye.Problem is when ingredient is consumed its script will terminate. I overcame this by creating a mute quest holding variables. I don't see if it can be done with no quest. | I wanted to create a piece of poisoned cheese (clone of cheese wedge) with 4 alchemical effects neither of which would be deadly poison - but which when consumed by PC would be like a poisoned apple - bye bye.Problem is when ingredient is consumed its script will terminate. I overcame this by creating a mute quest holding variables. I don't see if it can be done with no quest. Probably checking for active effects tracking them to the cheese but this is difficult - among other things because the ActiveEffectIndex doesn't seem to be chronological. | ||
Also of interest is the possibility to be extended to any actor, not only PC but also NPCs and creatures. Not sure if possible. | Also of interest is the possibility to be extended to any actor, not only PC but also NPCs and creatures. Not sure if possible. | ||
Create a clone of CheeseWedge and name it something like PoisonCheese. Add a quest (not start game enabled) (UdunPoisonedCheeseQuest) and attach one script to it (UdunPoisonedCheeseQuestScript) and one script to the PoisonedCheese you created (mine had formId 01004547, which I use directly). Here are the scripts. I tested them with OBSE v0015. | Create a clone of CheeseWedge and name it something like PoisonCheese. Add a quest (not start game enabled) (UdunPoisonedCheeseQuest) and attach one script to it (UdunPoisonedCheeseQuestScript) and one script to the PoisonedCheese you created (mine had formId 01004547, which I use directly). Here are the scripts. I tested them with OBSE v0015, but probably these final versions don't require OBSE. | ||
====object Script==== | ====object Script==== | ||
Line 58: | Line 58: | ||
end | end | ||
</pre> | </pre> | ||
[[User:UDUN|UDUN]] | [[User:UDUN|UDUN]] 19:01, 13 October 2008 (EDT) |