You are viewing an old version of this page. Return to the latest version.
Version of 18:07, 13 August 2013 by I need to Update My Profile
Difference between revisions of "LUA:Stealth"
(Created page with "This function will set a spawn to stealth or invis. For the second parameter 1 = stealth, any other value = invis. ==== Syntax ==== Stealth([Spawn] Target, [int8] stealth_type) ...") |
|||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
==== Syntax ==== | ==== Syntax ==== | ||
| − | Stealth([ | + | Stealth([int8] stealth_type, [Spawn] Target) |
==== Usage ==== | ==== Usage ==== | ||
| Line 8: | Line 8: | ||
function hailed(NPC, Spawn) | function hailed(NPC, Spawn) | ||
Say(NPC, "must hidez!!!") | Say(NPC, "must hidez!!!") | ||
| − | Stealth(NPC | + | Stealth(1, NPC) |
end | end | ||
</pre> | </pre> | ||
| − | When an npc with this function is hailed, they will say must hidez | + | When an npc with this function is hailed, they will say must hidez!!! Followed immediately by activating stealth. |
| − | [[LUA: | + | [[LUA:SpawnFunctions|Back to LUA Spawn Functions Index]] |
| + | |||
| + | |||
| + | Note* | ||
| + | |||
| + | If you use the invisibility function: remove with RemoveInvis() as RemoveStealth causes a crash. | ||
| + | If using RemoveInvis() the icon will still be visible(bug). | ||
Latest revision as of 15:20, 20 May 2019
This function will set a spawn to stealth or invis. For the second parameter 1 = stealth, any other value = invis.
Syntax
Stealth([int8] stealth_type, [Spawn] Target)
Usage
function hailed(NPC, Spawn)
Say(NPC, "must hidez!!!")
Stealth(1, NPC)
end
When an npc with this function is hailed, they will say must hidez!!! Followed immediately by activating stealth.
Back to LUA Spawn Functions Index
Note*
If you use the invisibility function: remove with RemoveInvis() as RemoveStealth causes a crash. If using RemoveInvis() the icon will still be visible(bug).