OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: terran4999 on 12 May 2008, 06:54:48

Title: Unit Stop Go
Post by: terran4999 on 12 May 2008, 06:54:48
Hey

How do you make a unit/group stop and go from its assigned WP's like in those escort missions. I know to make a unit stop is

Code: [Select]
dostop unitname
i dont know how to make a unit move again
Title: Re: Unit Stop Go
Post by: Mandoble on 12 May 2008, 21:38:46
You may use lockWP (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=l#207) to avoid the unit or group will proceed to next waypoint, and meanwhile you may order the group to move anywhere else. When the task is done, use the same command to unlock waypoints, so the unit or group will proceed with next waypoint.
Title: Re: Unit Stop Go
Post by: terran4999 on 13 May 2008, 02:57:36
So i created a unit call "sold" and gave him a few WP's and then I created two radio activatied trigger
on with:
Code: [Select]
sold lockWP true
 the other with

Code: [Select]
sold lockWP false
is that correct??
Title: Re: Unit Stop Go
Post by: Mandoble on 13 May 2008, 08:31:14
Yes.
Title: Re: Unit Stop Go
Post by: terran4999 on 14 May 2008, 21:19:16
Yeah, that didn't work. Do anyone have any ideas.  :blink:
Title: Re: Unit Stop Go
Post by: Mandoble on 15 May 2008, 20:04:18
What didnt work? Which was the expected effect?
Title: Re: Unit Stop Go
Post by: terran4999 on 20 May 2008, 21:39:20
the command "sold lockWP true/false" in the radio triggers didn't work. the unit just kept moving
Title: Re: Unit Stop Go
Post by: Gcfungus on 20 May 2008, 23:49:24
I'm not sure about this, but have you tried using the DisableAI Command (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=d#105)

For example:
Code: [Select]
aP DisableAI "MOVE"
-=GC=-Fungus1999
Title: Re: Unit Stop Go
Post by: terran4999 on 21 May 2008, 01:49:21
That worked to stop the unit. How do you make it move again??

I am just trying to create an escort mission where i get the ability to radio my escort truck to stop and go as i clear the path like in the campaign.  :P :P
Title: Re: Unit Stop Go
Post by: johnnyboy on 21 May 2008, 02:21:28
I believe:

aP enableAI "MOVE"
Title: Re: Unit Stop Go
Post by: Planck on 21 May 2008, 03:19:35
I believe enableAI is an ArmA only command.


Planck
Title: Re: Unit Stop Go
Post by: terran4999 on 21 May 2008, 03:39:31
(enable/disableAI "move") command would not work; has anybody made an escort mission before that would know how to radio units to move and stop

thanks  :clap:
Title: Re: Unit Stop Go
Post by: Mr.Peanut on 22 May 2008, 17:40:03
LockWP will work, but not if the unit is between WPs. If lockWP TRUE and the unit is between WPs then the unit will stop when it reaches its next WP.  Plus if you read the COMREF entry for the lockWP command, you will see it needs to be applied to the unit's group, not the individual.

Try
Code: [Select]
group sold lockWP TRUE
Title: Re: Unit Stop Go
Post by: terran4999 on 22 May 2008, 20:11:29
Never mind, I solved it by extracting the missions in the campaign and figured out what they did. Thanks for all your inputs  :good: :good: :good: