Jump to content
Sign in to follow this  
kmiles1990

doMove not working from .sqf script

Recommended Posts

So I have 2 civs about 100 feet away from eachother. One is names man1, the other is man2. On man1s init I put this doMove (position man2); and it worked fine. Next I tried to pu it in a sqf file instead ... I have the sqf script on my scroll menu you I can scroll and click it. In the sqf I wrote man1 doMove (position man2); When I click it in my scroll wheel though. He does not move. Could anyone know why?

I also tried

man1 disableAI "ANIM";

man1 doMove (position man2);

Still not working with that either

Share this post


Link to post
Share on other sites

if you define "man1" and "man2" in the init-fields of some units, then you might want/need to waitUntil{!(isNil "man1" || isNil "man2")}; in your script - that might run before those init-fields are executed? :confused:

Or maybe, as a first step, just try to diag_log text format["MAN1: %1", man1]; and see what you get.

Otherwise _unit1 doMove (position _unit2); should work just fine, given _unit1/_unit2 are defined.

Share this post


Link to post
Share on other sites

As far as I know disableAI "ANIM" will freeze a unit and prevent it from doing anything, so take that out.

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  

×