HasScriptCommand

From GECK
(Redirected from ScriptHasCommand)
Jump to: navigation, search


A function added by the New Vegas Script Extender version 6.1.6.

Description

Returns true if the specified script at any point calls the specified command.

Syntax

[help]
(success:0/1) HasScriptCommand CommandOpcode:int Script/Form:form EventID:int 

Example

; Activate is 4109
if HasScriptCommand 4109 SunnyRef  
   ; do stuff
endif

or

if HasScriptCommand (GetCommandOpcode "Activate") TestScript 2 ; Check if TestScript has activate command inside OnActivate block
   ; do stuff
endif

See Also