\textbf{Notes}: According to my testing, the activate function can not
-be used by itself, without OnActivate in the same script. The OnActivate
-and Activate functions can be in different parts of the script, though.
-However, Activate will not work before OnActivate has not at least been
-called once. There have been reports that the object also must have been
-manually activated at least once within the last 72 hours, so apparently
-the game eventually forgets that OnActivate has been called previously.
-Containers require manual activation each load session (forum info /
-Phaedrus). Play around with this testscript (I had it attached to a
-door) to see for yourself:
-Begin GBG_closing_door
-Short done
-if ( \textbf{OnActivate} == 1 )
-MessageBox "Thank you for activating"
-endif
-if ( done == 0 )
-If ( GetDistance, Player \textless{} 100 )
-set done to 1
-MessageBox "Player close"
-endif
-endif
-if ( done == 1 )
-If ( GetDistance, Player \textgreater{} 200 )
-MessageBox "Sesame"
-\textbf{Activate}
-set done to 0
-endif
-endIf
-End
Also:
-Begin TT_pickmace
-short doonce
-short AIState
-if ( doonce == 0 )
-if ( GetDistance, Player \textless{} 400 )
-\textbf{AIActivate} TT_daedric_mace
-set doonce to 1
-endif
-elseif ( doonce == 1 )
-set AIState to GetCurrentAIPackage
-MessageBox "Package = \%g", AIState
-if ( GetItemCount, TT_daedric_mace \textgreater= 1 ); when NPC has the
-mace in his inventory
-MessageBox "Done"
-AIWander 512, 5, 0, 0, 20, 0, 0, 10, 30, 0, 0
-set doonce to 2
-endif
-endif
-end
Also:
-Begin TT_pickmace
-short doonce
-short AIState
-if ( doonce == 0 )
-if ( GetDistance, Player \textless{} 400 )
-\textbf{AIActivate} TT_daedric_mace
-set doonce to 1
-endif
-elseif ( doonce == 1 )
-set AIState to GetCurrentAIPackage
-MessageBox "Package = \%g", AIState
-if ( GetItemCount, TT_daedric_mace \textgreater= 1 ); when NPC has the
-mace in his inventory
Note: I am unsure why I created this txt file: TT_pickmace. I couldn't find where it goes in the doc.