addWaypoint: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 33: Line 33:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
Example of easy use of this command to move a unit(group) to another unit.
'''Example 1:'''easy use of this command to move a unit(group) to another unit.


In the group(group that moves)leader's Init field put:  
Group to move leader's Init field:<br>
'''gotogroup=group this'''
<code>gotogroup=group this</code><br>
Name the unit or object that you want this unit(group) to move to. I wanted this unit to
Name the unit or object that you want this unit(group) to move to. I named a soldier Bobby.
go to Bobby. I named the soldier Bobby.
Make a trigger that will send the gotogroup to Bobby. (Use radio Bravo)
Make a trigger that will send the gotogroup to Bobby. Use radio Bravo.
In the trigger's Onact section put this code:<br>
In the Onact section put this code:
<code>WP=gotogroup AddWayPoint [GetPos bobby,0];[gotogroup,0] setWaypointType "MOVE"'''</code><br>
'''WP=gotogroup AddWayPoint [GetPos bobby,0];[gotogroup,0] setWaypointType "MOVE"'''
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 23:57, 23 February 2007

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

Description

Description:
Adds a new waypoint to a group. The waypoint is placed randomly in a circle with the given center and radius.
Groups:
Uncategorised

Syntax

Syntax:
group addWaypoint [center, radius]
Parameters:
group: Group
center: Position ?
radius: Number ?
Return Value:
Array - a waypoint with format [group, index]

Examples

Example 1:
wp = grp addWaypoint [ position player, 0]

Additional Information

See also:
deleteWaypoint

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

Example 1:easy use of this command to move a unit(group) to another unit. Group to move leader's Init field:
gotogroup=group this
Name the unit or object that you want this unit(group) to move to. I named a soldier Bobby. Make a trigger that will send the gotogroup to Bobby. (Use radio Bravo) In the trigger's Onact section put this code:
WP=gotogroup AddWayPoint [GetPos bobby,0];[gotogroup,0] setWaypointType "MOVE"

Bottom Section