Quick Questions, Quick Answers - Thread #18

Post » Fri Mar 15, 2013 7:10 am

http://www.gamesas.com/topic/1348211-the-quick-ck-questions-thread/ | http://www.gamesas.com/topic/1353350-quick-ck-questions-thread-2/ | http://www.gamesas.com/topic/1365336-quick-questions-quick-answers-the-3rd/ | http://www.gamesas.com/topic/1373468-quick-questions-quick-answers-thread-4/ | http://www.gamesas.com/topic/1395667-quick-questions-quick-answers-thread-5/ | http://www.gamesas.com/topic/1406245-quick-questions-quick-answers-thread-6/ | http://www.gamesas.com/topic/1411305-quick-questions-quick-answers-thread-7/ | http://www.gamesas.com/topic/1414436-quick-questions-quick-answers-thread-8/ | http://www.gamesas.com/topic/1418982-quick-questions-quick-answers-thread-9/page__st__180__p__21821206__hl__quick%20questions,%20quick%20answers%20thread__fromsearch__1#entry21821206 | http://www.gamesas.com/topic/1424574-questions-quick-answers-thread-10/ | http://www.gamesas.com/topic/1427837-quick-questions-quick-answers-thread-11/ | http://www.gamesas.com/topic/1432221-quick-questions-quick-answers-thread-12/ | http://www.gamesas.com/topic/1434686-quick-questions-quick-answers-thread-13/ | http://www.gamesas.com/topic/1437011-quick-questions-quick-answers-thread-14/ | http://www.gamesas.com/topic/1439381-quick-questions-quick-answers-thread-15/ | http://www.gamesas.com/topic/1442236-quick-questions-quick-answers-thread-16/ | http://www.gamesas.com/topic/1442236-quick-questions-quick-answers-thread-16/http://www.gamesas.com/topic/1444947-quick-questions-quick-answers-thread-17/

Have a quick question? Need a quick answer? If you have not had any luck with the http://www.creationkit.com/Main_Page, post away and hopefully someone will have the answer(s) you seek.
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Thu Mar 14, 2013 8:37 pm

Scripting question. It appears the following script works fine, except the notification never shows. Does anybody know why that could be? :)

Spoiler
Formlist Property HISCarcassFLST autoActor Property PlayerREF autoKeyword Property ActorTypeAnimal autoKeyword Property ActorTypeCreature autoEvent OnInit()   isSKSELoaded()EndEventEvent OnPlayerLoadGame()   isSKSELoaded()EndEventbool function isSKSELoaded()       if (SKSE.GetVersion())              return True     AddInventoryEventFilter(HISCarcassFLST)         Debug.Notification("SKSE Loaded. Hunting in Skyrim SKSE features enabled.")       else             return False       endifendfunctionEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)    if HISCarcassFLST.HasForm(akBaseItem)       if akSourceContainer.HasKeyWord(ActorTypeAnimal) || akSourceContainer.HasKeyWord(ActorTypeCreature)          Input.TapKey(Input.GetMappedKey("Tween Menu"))        endif     endifendEvent
User avatar
emma sweeney
 
Posts: 3396
Joined: Fri Sep 22, 2006 7:02 pm

Post » Fri Mar 15, 2013 8:46 am

I'd assume that nothing after the "return" statement is executed, because you've left the function at that point and "returned" control to the code that called the function.

The question may be whether you truly need a bool function with a return value, or whether a generic function that doesn't return anything would suffice?
User avatar
Alister Scott
 
Posts: 3441
Joined: Sun Jul 29, 2007 2:56 am

Post » Fri Mar 15, 2013 12:45 am

I have a feeling it's the "return true" bit. Try putting that after the notification, not before :shrug:

- Hypno

EDIT: Ninja'd
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am

Post » Fri Mar 15, 2013 3:46 am

I "nicked" this script from a recent post :tongue: The inventory filter gets added fine, but I'll try it and see what the result is :smile:

EDIT:

Yep, just put the TRUE below the function and notification :)
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am


Return to V - Skyrim