You are viewing an old version of this page. Return to the latest version.
Version of 14:04, 12 September 2013 by I need to Update My Profile
Difference between revisions of "LUA:SpawnSet"
(Created page with "= LUA Functions: SpawnSet() = Works like /spawn set in game ==== Syntax ==== SpawnSet(param1, param2, param3, param4) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...") |
|||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | = | + | {{LUAFunction |
| − | + | |Name = SpawnSet | |
| − | + | |Description = Sets various settings for a NPC or Object | |
| − | + | |Param1 = Spawn | |
| − | = | + | |Param1Desc = must be a reference to a NPC or Object. |
| − | + | |Param2 = string | |
| − | + | |Param2Desc = is what we want to change. ''eg name'' | |
| − | + | |Param3 = string | |
| − | = | + | |OptionalParam1Desc = is what we want to change the param2 to |
| − | + | |Example = | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<pre> | <pre> | ||
function hailed(NPC, Spawn) | function hailed(NPC, Spawn) | ||
| − | SpawnSet(NPC, "name", " | + | SpawnSet(NPC, "name", "Frankenstein") |
end | end | ||
</pre> | </pre> | ||
| + | |ExampleDesc = When this NPC is hailed it will change its name to "Frankenstein" | ||
| + | |Notes = /spawn set location does not require a vaule, the client's current location is used instead. | ||
| − | + | [[Commands:spawn_set|List]] of spawn set param2 variables you can change | |
| + | }} | ||
Latest revision as of 14:29, 30 January 2021
LUA:AllFunctions - SpawnSet
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Sets various settings for a NPC or Object
Syntax
SpawnSet(param1, param2, param3)
Parameters
- Required - param1 (Spawn), param2 (string), param3 (string)
- param1 must be a reference to a NPC or Object.
- param2 is what we want to change. eg name
- param3 Description not provided in the template...
Example
function hailed(NPC, Spawn)
SpawnSet(NPC, "name", "Frankenstein")
end
When this NPC is hailed it will change its name to "Frankenstein"
Notes
/spawn set location does not require a vaule, the client's current location is used instead.
List of spawn set param2 variables you can change