Jump to content
Sign in to follow this  
kheiro

Need help with script‎

Recommended Posts

1_Hi guys I'm trying to script an Move but I can't get it to work. Here is what I have. I'm not sure why it isn't working or even if I'm approaching it correctly.

sapot.sqs

_man = _this select 0
_man1 = _this select 1
_man2 = _this select 2
_target = _this select 3
_man setBehaviour "AWARE"
_man setCombatMode "RED"
_man setSpeedMode "Full"
_man doTarget _target
_man enableAI "MOVE"
_man1 setBehaviour "AWARE"
_man1 setCombatMode "RED"
_man1 setSpeedMode "Full"
_man1 doTarget _target
_man1 enableAI "MOVE"
_man2 setBehaviour "AWARE"
_man2 setCombatMode "RED"
_man2 setSpeedMode "Full"
_man2 doTarget _target
_man2 enableAI "MOVE"
#Loop
?_target distance _man >= 10 : {_x doMove getPos _target} foreach units _man
?_target distance _man1 >= 10 : {_x doMove getPos _target} foreach units _man1
?_target distance _man2 >= 10 : {_x doMove getPos _target} foreach units _man2
~4
? (count units _man) (count units _man1) (count units _man)2 <= 1 : exit
?(!(alive _target)) : exit
goto "Loop"

Why when i start the mission i see all units cant move?

2_ this Command Reference not work for me

* assignAsDriver

* assingAsCommander

* assingAsGunner

SOMEONE PLEASE HELP!

Share this post


Link to post
Share on other sites

Hi, I've recently dl'ed the demo of OA & I'm trying to familiarise myself with the editor. I ran into a few problems. So I made a post in the general section under "ArmA 2: Operation Arrowhead - DEMO!" but as this concerns editing too; I asked the OP of this thread if it was OK to put a 'signpost' post rather than double posting.

ArmA 2: Operation Arrowhead - DEMO! - RomeoSierra's demo scripting post

I have no prior knowledge of programming/scripting! So talk slowly! he he :rolleyes:

Thanks in advance for any assistance. ;)

& thankyou kheiro

Edited by RomeoSierra
additional info

Share this post


Link to post
Share on other sites

What exactly are you trying to do, kheiro? Looks like you're missing several things - just put in the init something like

this doMove player

if you want the AI to come after the player - or replace it with the name of whatever variable you want. Beyond that, I would need to know more about what you're after.

If you want someone to start the mission as driver, gunner, etc. use moveInGunner, etc.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×