setVehicleInit: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "this" to "this")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma1
|game1= ofpe
|version1= 1.00


|1.00
|game2= arma1
|version2= 1.00
 
|game3= arma2
|version3= 1.00
 
|game4= arma2oa
|version4= 1.51
 
|game5= tkoh
|version5= 1.00


|eff= global
|eff= global
Line 9: Line 20:
|gr1= Object Manipulation
|gr1= Object Manipulation


| Attach a statement to a unit. The statement is propagated over the network in MP games, it can be executed by invoking [[processInitCommands]].
|descr= Attach a statement to a unit. The statement is propagated over the network in MP games, it can be executed by invoking [[processInitCommands]].


{{Feature|arma3|For security reasons, the command was disabled in Arma 3. Use [[remoteExec]] for remote execution.}}
{{Feature|arma3|For security reasons, the command was disabled in Arma 3. Use [[remoteExec]] for remote execution.}}


| unitName [[setVehicleInit]] statement
|mp= The statement will be sent to clients connecting after the command has been executed.<br>
Note that the statement will be executed automatically by [[Multiplayer Scripting#Join In Progress|JIP]] clients before [[Event Scripts#init.sqs|init.sqs]]/[[Event_Scripts#init.sqf|init.sqf]] have been executed - see [[Initialization Order]].
 
|s1= unitName [[setVehicleInit]] statement


|p1= unitName: [[Object]]
|p1= unitName: [[Object]]
Line 19: Line 33:
|p2= statement: [[String]]
|p2= statement: [[String]]


| [[Nothing]]
|r1= [[Nothing]]
   
   
|x1= <code>_soldier3 [[setVehicleInit]] "[[Magic Variables#this_2|this]] [[allowFleeing]] 0";</code>
|x1= <code>_soldier3 [[setVehicleInit]] "[[Magic Variables#this_2|this]] [[allowFleeing]] 0";</code>


| [[Multiplayer Scripting]], [[Initialization Order]], [[processInitCommands]], [[clearVehicleInit]]
|seealso= [[Multiplayer Scripting]], [[Initialization Order]], [[processInitCommands]], [[clearVehicleInit]]
|mp= The statement will be sent to clients connecting after the command has been executed.<br>
Note that the statement will be executed automatically by [[Multiplayer Scripting#Join In Progress|JIP]] clients before [[Init.sqs]] or its [[SQF]] counterpart has been executed.
}}
}}


Line 31: Line 43:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<dd class="notedate">03:12, 20 March 2008 (CET)
<dd class="notedate">03:12, 20 March 2008 (CET)</dd>
<dt class="note">[[User:Crowe|Crowe]]</dt>
<dt class="note">[[User:Crowe|Crowe]]</dt>
<dd class="note">setVehicleInit statements will be executed in the order of the unit creation time.
<dd class="note">setVehicleInit statements will be executed in the order of the unit creation time.
This means, the statements of units who have been placed in the editor first, will be executed first.
This means, the statements of units who have been placed in the editor first, will be executed first.</dd>


<dd class="notedate">Posted on May 22, 2016 - 21:38 (UTC)</dd>
<dd class="notedate">Posted on May 22, 2016 - 21:38 (UTC)</dd>
<dt class="note">[[User:AgentRevolution|AgentRev]]</dt>
<dt class="note">[[User:AgentRevolution|AgentRev]]</dt>
<dd class="note">
<dd class="note">[[remoteExec]] and [[remoteExecCall]] will accept an object as JIP parameter, which make them behave in a very similar way to [[setVehicleInit]] before it was disabled.</dd>
[[remoteExec]] and [[remoteExecCall]] will accept an object as JIP parameter, which make them behave in a very similar way to [[setVehicleInit]] before it was disabled.


<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|ofpe|Scripting Commands}}
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Revision as of 00:07, 16 March 2021

Hover & click on the images for description

Description

Description:
Attach a statement to a unit. The statement is propagated over the network in MP games, it can be executed by invoking processInitCommands.
Arma 3
For security reasons, the command was disabled in Arma 3. Use remoteExec for remote execution.
Multiplayer:
The statement will be sent to clients connecting after the command has been executed.
Note that the statement will be executed automatically by JIP clients before init.sqs/init.sqf have been executed - see Initialization Order.
Groups:
Object Manipulation

Syntax

Syntax:
unitName setVehicleInit statement
Parameters:
unitName: Object
statement: String
Return Value:
Nothing

Examples

Example 1:
_soldier3 setVehicleInit "this allowFleeing 0";

Additional Information

See also:
Multiplayer ScriptingInitialization OrderprocessInitCommandsclearVehicleInit

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
03:12, 20 March 2008 (CET)
Crowe
setVehicleInit statements will be executed in the order of the unit creation time. This means, the statements of units who have been placed in the editor first, will be executed first.
Posted on May 22, 2016 - 21:38 (UTC)
AgentRev
remoteExec and remoteExecCall will accept an object as JIP parameter, which make them behave in a very similar way to setVehicleInit before it was disabled.