createVehicleLocal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (example, locality)
m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2")
(20 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{Command|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma |= Game name
| arma |Game name=


|1.00|= Game version
|1.00|Game version=
|eff= local |= Effects in MP
|eff= local |Multiplayer Effects=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Creates an object of the given type. Created object is not transferred through network in MP games. |= Description
| Creates an object of the given type. Created object is not transferred through network in MP games. [[netId]] of such vehicle in multiplayer will be "0:0". To disable local vehicle creation, use [[CfgDisabledCommands]] to blacklist this command. Alternatively, you can use [[createSimpleObject]] with local option enabled where applicable.|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Object]] <nowiki>=</nowiki> type '''createVehicleLocal''' position |= Syntax
| type '''createVehicleLocal''' position |SYNTAX=


|p1= type: [[String]] |= Parameter 1
|p1= type: [[String]] |PARAMETER1=


|p2= position: [[Position]] |= Parameter 2
|p2= position: [[Position]] |PARAMETER2=


| [[Object]] |= Return value
| [[Object]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_lightsource = "#lightpoint" [[createVehicleLocal]] _pos;</code> |= Example 1
|x1= <code>_lightsource = "#lightpoint" [[createVehicleLocal]] _pos;</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[createVehicle]], [[deleteVehicle]], [[createUnit]], [[createUnit array]], [[createVehicle array]] |= See also
| [[createVehicle]], [[createMine]], [[deleteVehicle]], [[createUnit]]|SEEALSO=


}}
}}
Line 30: Line 30:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
If the object that is created is of the type ammo, then it will created on '''all''' clients (''tested only on VBS2''). --[[User:Kronzky|Kronzky]] 07:18, 5 June 2008 (CEST)
<dd class="notedate">Posted on 07:18, 5 June 2008 (CEST)</dd>
<dt class="note">[[User:Kronzky|Kronzky]]</dt><dd class="note">
If the object that is created is of the type ammo, then it will created on '''all''' clients (''tested only on VBS2'').  


Indeed the type of Ammo is transfered to '''ALL''' clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on Arma 1 - Arma 2 OA (latest patch).--[[User:DamonDaemon|DamonDaemon]] 18:04, 5 September 2013 (CEST)
<dd class="notedate">Posted on 18:04, 5 September 2013 (CEST)</dd>
<dt class="note">[[User:DamonDaemon|DamonDaemon]]</dt><dd class="note">
Indeed the type of Ammo is transfered to '''ALL''' clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on Arma 1 - Arma 2 OA (latest patch).
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>
Line 42: Line 46:
[[Category:Scripting Commands ArmA|CREATEVEHICLELOCAL]]
[[Category:Scripting Commands ArmA|CREATEVEHICLELOCAL]]
[[Category:Command_Group:_Object_Manipulation|CREATEVEHICLELOCAL]]
[[Category:Command_Group:_Object_Manipulation|CREATEVEHICLELOCAL]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on November 2, 2018 - 12:16 (UTC)</dd>
<dt class="note">[[User:demellion|demellion]]</dt>
<dd class="note">
'''WARNING:''' Do not instigate [[createVehicle]] or [[createVehicleLocal]] within a server function executed with [[Functions_Library_(Arma_3)#Pre_and_Post_Init|preInit]] flag.<br> This will cause ''"You cannot play/edit this mission"'' for a vehicles compiled from a [[Arma_3_Startup_Parameters|-mod]] and make server skip/loop that mission init.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 01:00, 10 January 2020

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Creates an object of the given type. Created object is not transferred through network in MP games. netId of such vehicle in multiplayer will be "0:0". To disable local vehicle creation, use CfgDisabledCommands to blacklist this command. Alternatively, you can use createSimpleObject with local option enabled where applicable.
Groups:
Uncategorised

Syntax

Syntax:
type createVehicleLocal position
Parameters:
type: String
position: Position
Return Value:
Object

Examples

Example 1:
_lightsource = "#lightpoint" createVehicleLocal _pos;

Additional Information

See also:
createVehiclecreateMinedeleteVehiclecreateUnit

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

Notes

Posted on 07:18, 5 June 2008 (CEST)
Kronzky
If the object that is created is of the type ammo, then it will created on all clients (tested only on VBS2).
Posted on 18:04, 5 September 2013 (CEST)
DamonDaemon
Indeed the type of Ammo is transfered to ALL clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on Arma 1 - Arma 2 OA (latest patch).

Bottom Section

Posted on November 2, 2018 - 12:16 (UTC)
demellion
WARNING: Do not instigate createVehicle or createVehicleLocal within a server function executed with preInit flag.
This will cause "You cannot play/edit this mission" for a vehicles compiled from a -mod and make server skip/loop that mission init.