Ingredientpotion scripting

Post » Sat Nov 17, 2012 8:56 am

I'd like to create a potion that does not deplete and directly applies a script upon consumption. Is that doable? While I can force it to cast a custom spell which has a custom effect, I'd much prefer not to bother with 3 layers of abstractions because all I want is to give the user an option to set a global variable.

(i.e. Eating Apple #1 sets variable X = 1, etc)
User avatar
Tania Bunic
 
Posts: 3392
Joined: Sun Jun 18, 2006 9:26 am

Post » Sat Nov 17, 2012 1:08 pm

http://www.creationkit.com/Potion_Script - Not much help at all ... no OnConsume/OnActivate/OnUse Event?

http://www.creationkit.com/OnHit_-_ObjectReference - Can you use akSource, then run a script on said source? (This probably your 3 layers of abstraction, though?)

http://www.creationkit.com/OnSpellCast_-_ObjectReference ... Aha, now then ... Using a Potion is casting a spell ... So, can you use this event?


(can't find much else)
User avatar
DeeD
 
Posts: 3439
Joined: Sat Jul 14, 2007 6:50 pm

Post » Sat Nov 17, 2012 10:45 pm

Very doable with the Event OnObjectEquipped.

http://www.creationkit.com/OnObjectEquipped_-_Actor
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Sat Nov 17, 2012 1:17 pm

Very doable with the Event OnObjectEquipped.

http://www.creationkit.com/OnObjectEquipped_-_Actor
Argh... the hell? Consuming it counts as equipping?
User avatar
Chris Ellis
 
Posts: 3447
Joined: Thu Jul 26, 2007 10:00 am


Return to V - Skyrim