Difference between revisions of "Crashes"

16 bytes added ,  20:20, 18 December 2007
imported>Kivan
m (Typo of missing "-")
imported>Haama
(→‎Activating a Container (including NPC): Dialog scripts are safe too)
Line 71: Line 71:
#[[Activate]] a [[Container]], so that you run it's [[OnActivate]] block, that is:
#[[Activate]] a [[Container]], so that you run it's [[OnActivate]] block, that is:
<pre>YourContainer.Activate player, 1</pre>
<pre>YourContainer.Activate player, 1</pre>
#from an [[Object scripts|Object Script]] (and maybe a [[Magic effect scripts|Magic Effect Script]], but a [[Quest scripts|Quest Script]] or direct activation would be safe)
#from an [[Object scripts|Object Script]] (and maybe a [[Magic effect scripts|Magic Effect Script]], but a [[Quest scripts|Quest Script]], direct activation, or dialog script would be safe)
#when a scripted item is in it (even a [[Scriptname]] declaration is too much)
#when a scripted item is in it (even a [[Scriptname]] declaration is too much)
you will get a CTD upon activation. The easiest way around it is to place the script on another object (an [[Activator]], etc.) and activate it instead of the container. You can also use a [[Quest scripts|Quest Script]] to activate the container, as such:
you will get a CTD upon activation. The easiest way around it is to place the script on another object (an [[Activator]], etc.) and activate it instead of the container. You can also use a [[Quest scripts|Quest Script]] to activate the container, as such:
Anonymous user