OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pellejones on 08 Aug 2004, 19:41:09

Title: "doMove" with a group, how?
Post by: Pellejones on 08 Aug 2004, 19:41:09
How do I issue a "doMove" command to a group that is spawned?

Here's an example
Quote
"SoldierWB" createunit [getpos spawn1,group1]
~1
"SoldierWB" createunit [getpos spawn1,group1]
~1
"SoldierWB" createunit [getpos spawn2,group1]
~1
"SoldierWB" createunit [getpos spawn2,group2]
~1
"SoldierWB" createunit [getpos spawn2,group2]
~1
"SoldierWB" createunit [getpos spawn2,group2]

The group spawns. And at their position of spawning I place a trigger that does this:
Quote
[group1] doMove getMarkerPos "WP1"; [group2] doMove getMarkerPos "WP1";

What happens? well the first spawn in each group move to the maker, the rest of them just stand there like bafoons.

I tried to put a delay on the trigger, but that din't help.

Please help.
Title: Re:"doMove" with a group, how?
Post by: Mud_Spike on 08 Aug 2004, 20:07:41
'move' is probably what you want since it creates a new waypoint for the entire group. Look it up in the comref.

Or you could use:
Code: [Select]
"_x doMove GetMarkerPos {foo}" foreach units mygrp