Difference between revisions of "Crashes"
→Activating a Container (including NPC): Dialog scripts are safe too
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]] | #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: |