PropertyValue
rdfs:label
  • ExecuteScript
  • ExecuteScript
rdfs:comment
  • function ExecuteScript (string sScript, object oTarget = OBJECT_SELF) Make oTarget run sScript and then return execution to the calling script. If sScript does not specify a compiled script, nothing happens. * Return type: void * Include file: nwscriptdefn
  • Plik do załączenia: (nie wymagany) Parametry: sScript - nazwa skompilowanego skryptu, zapisana w cudzysłowach "" oTarget - obiekt, z którego zostanie wywołany skompilowany skrypt
  • The ExecuteScript() NWScript command interrupts the execution of the current script in order to run another one. After the second script finishes, the original script resumes execution. This is an alternative to include files for sharing code among several scripts. An advantage to executing a script instead of calling a function in an included script is that the common code can be changed and compiled once, instead of compiled into each script that uses the common code. (This is the principle that makes spellhooking possible, for example.)
dcterms:subject
dbkwik:nwn2/property/wikiPageUsesTemplate
returns
Name
  • ExecuteScript
param
  • object oTarget
  • string sScript
param2desc
  • The object that will run the script .
param1desc
  • The name of a compiled script to run.
dbkwik:nwn/property/wikiPageUsesTemplate
abstract
  • function ExecuteScript (string sScript, object oTarget = OBJECT_SELF) Make oTarget run sScript and then return execution to the calling script. If sScript does not specify a compiled script, nothing happens. * Return type: void * Include file: nwscriptdefn
  • Plik do załączenia: (nie wymagany) Parametry: sScript - nazwa skompilowanego skryptu, zapisana w cudzysłowach "" oTarget - obiekt, z którego zostanie wywołany skompilowany skrypt
  • The ExecuteScript() NWScript command interrupts the execution of the current script in order to run another one. After the second script finishes, the original script resumes execution. This is an alternative to include files for sharing code among several scripts. An advantage to executing a script instead of calling a function in an included script is that the common code can be changed and compiled once, instead of compiled into each script that uses the common code. (This is the principle that makes spellhooking possible, for example.) This command allows an easy transfer of execution to another object if so desired (rather than going through <a href="/mediawiki/AssignCommand" title="AssignCommand">AssignCommand</a>()). In fact, this is the only way to transfer execution to another object in the middle of a script. (Something assigned via <a href="/mediawiki/AssignCommand" title="AssignCommand">AssignCommand</a>() is not executed until the current script finishes.)