Jump to content
Sign in to follow this  
Bart.Jan

Ai to take flag

Recommended Posts

I want ai soldier to take flag from flagpole.

I have russian flag named vlajka and in init field:

this setflagtexture "rus_vlajka.pac";this setflagside east

I can take it manualy and I can order members of sqad to take it. But I want AI soldier to take it.

I tried soldier action ["takeflag"]

soldier action ["takeflag",vlajka]

soldier action ["takeflag",vlajka,getpos vlajka]

soldier action ["takeflag",getpos vlajka]

Soldier was positioned near flagpole.

It didn't works.

Is there someone who knows ?

Share this post


Link to post
Share on other sites

BIS use this in the initfield of an empty flag (called flag1) for the Hummvee SP mission.

this setFlagTexture "rus_vlajka.pac"

the try:

flag1 setFlagOwner aP

to set the flag owner to the unit called aP. Use it in an trigger activation field when the unit gets close to the flag or something.

Share this post


Link to post
Share on other sites

Yes, I know about setflagowner. But I would like to know, how to use command soldier action ["takeflag"]. I would like to hear commander saying : "4 take flag at ...", and soldier to run to flag pole, croutch and take flag. I know that I can use script with step by step commands, but why if there must be command for it ?

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  

×