createUnit: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 44: Line 44:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
 
<dd class="notedate">Posted on August 13, 2006 - 12:32</dd>
<dt class="note">'''[[User:Raedor|raedor]]'''</dt><dd class="note">{{{1}}}</dd>
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 13:32, 13 August 2006

Hover & click on the images for description

Description

Description:
Create an interacting AI soldier.
Multiplayer:
The code in init is executed on all connected clients in multiplayer. It can therefore be used to get around the publicVariable limitation of not being able to send strings and arrays over the network.
Groups:
Uncategorised

Syntax

Syntax:
type createUnit [position, group, init*, skill*, rank*] * optional, if one is set, all precedent arguments have to be set too
Parameters:
type: String - type of the unit that should be created
position: Position - position to create the unit at
group: Group - group were the unit will belong to. This group has to exist already! It is not possible to use grpNull as argument.
init: Code - commands that are executed when the unit has been created. The unit is stored in the this variable. The default value is "".
skill: Number - range 0 to 1. 0 is the lowest skill, 1 the highest. The default value is 0.5. If this argument is set, init must be set too.
rank: String - one of "PRIVATE", "CORPORAL", "SERGEANT", "LIEUTNANT", "CAPTAIN", "MAJOR" and "COLONEL". If this argument is set, init and skill must be set too.
Return Value:
Nothing

Examples

Example 1:
"SoldierW" createUnit [position player, group player]

Additional Information

See also:
createVehicledeleteVehicle

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 August 13, 2006 - 12:32
raedor
{{{1}}}

Bottom Section