Any way a book script can detect itself?

Post » Thu Sep 01, 2016 10:49 pm

I want to make just one master script for several special skill books.



Is there a way for the script on activation of the book to know which book the player activated at that moment?

User avatar
MR.BIGG
 
Posts: 3373
Joined: Sat Sep 08, 2007 7:51 am

Post » Thu Sep 01, 2016 10:56 am

wait wait wait... I think I know how to do this. I forgot that the SAME script can still be assigned DIFFERENT property values variables!



I will just assign a book variable to itself and then the script will know what book is being read! :facepalm:



But I am glad there is a way to get this done! :P

User avatar
WYatt REed
 
Posts: 3409
Joined: Mon Jun 18, 2007 3:06 pm

Post » Thu Sep 01, 2016 7:39 pm

What about



Event OnActivate(ObjectReference akActionRef)
Book thisBook = GetBaseObject() as Book ;book object may be SKSE only?
endEvent
User avatar
Inol Wakhid
 
Posts: 3403
Joined: Wed Jun 27, 2007 5:47 am


Return to V - Skyrim