Scripting/Squirrel/Functions/Object.Delete: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "== Syntax == <pre>bool Object.Remove</pre> == Arguments == '''> Object''' - The object instance. == Example == This example will create a pickup when the script loads and...") |
m (Minor change in info (create a pickup) to (create an object)) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Syntax == | == Syntax == | ||
<pre> | <pre>Object.Delete</pre> | ||
== Arguments == | == Arguments == | ||
''' | '''Object''' - The object instance. | ||
== Example == | == Example == | ||
This example will create | This example will create an object when the script loads and deletes it when it unloads. | ||
< | <source lang=squirrel> | ||
function onScriptLoad() | |||
{ | { | ||
myObject <- CreateObject( 334, 1, Vector( -2261.12, 753.12, 211.123 ),255 ); | myObject <- CreateObject( 334, 1, Vector( -2261.12, 753.12, 211.123 ),255 ); | ||
Line 20: | Line 21: | ||
myObject.Delete(); | myObject.Delete(); | ||
} | } | ||
</ | </source> | ||
== Related Functions == | |||
{{Scripting/Squirrel/Functions/Object_Functions}} | |||
[[Category:Scripting/Squirrel/Functions/Object_Functions]] |
Latest revision as of 12:12, 19 February 2017
Syntax
Object.Delete
Arguments
Object - The object instance.
Example
This example will create an object when the script loads and deletes it when it unloads.
function onScriptLoad()
{
myObject <- CreateObject( 334, 1, Vector( -2261.12, 753.12, 211.123 ),255 );
}
function onScriptUnload()
{
myObject.Delete();
}