Jump to content
Sign in to follow this  
kennypooh

Action menu to move ai forward

Recommended Posts

BIS original selections:

Seletct AI, 1 = move, 0 = other, 1 = north, then how many meters to move him.

How can I tell AI (not in my squad) how many meters to move with my own action menu? EX: Move -- North -- 50 meters

Thanks, Ken

BTW I have searched extensively here and at ofpec. smile_o.gif

Share this post


Link to post
Share on other sites

I would suggest using the onmapsingleclick command, but if you want to do it with the action menu, have each action you add to the squad leader execute a different script. This way will be very messy but it will work.

RED

Share this post


Link to post
Share on other sites

Thanks for the reply Red, but I didn't make myself clear enough. I know how to do scripts for action menus. I don't know the command for meters:

_this guy commandmove __

Fill in the blank to get the guy to move NW for 50 meters.

Thanks again.

Ken

Share this post


Link to post
Share on other sites

To get a unit to move NW 50 meters is easy, it's covering all the directions and distances that gets "messy"

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">...

ai_pos = leader ai_squad;

GameLogic setpos[(ai_pos select 0) - 36, (ai_pos select 1) + 36];

(leader ai_squad) domove (getpos GameLogic);

...

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  

×