Jump to content
Sign in to follow this  
Dark Knight

How do u.....

Recommended Posts

how do u make the AI go into crouch mode and stay there

i guess it will be using

unitname setunitpos "confused.gif"

but wat will it be!!!! i have tied so many types but still no luck

please help.. ANY ONE!!!

Share this post


Link to post
Share on other sites

Here ya go

hope u know how to use a script mate  smile.gif

this is a tiny snippet from my trench cover script, this snippet should keep him crouched permanently. Hell be able to fire M16, reload m16 and target M16. But if he is AI then his targeting will be a bit slower than normal. He also will have a very hard time changed his weapon to law or throwing a grenade. However all these issues have been solved with my main trench cover script which is in a beta  test stage at www.ofpec.com

for a full update read here:

http://www.flashpoint1985.com/cgi-bin....t=25253

then read here

http://www.ofpec.com/yabbse....id=5966

then read here for the solution

http://www.ofpec.com/yabbse....id=6123

#start

_crew1 disableai "move"

? not(alive _crew1): goto "end"

_crew1 setcombatmode "yellow"

~2

_crew1 setbehaviour "combat"

~0.1

_crew1 setunitpos "up"

~2

_crew1 playmove "combattocrouch"

~2

#loop

? not(alive _crew1): goto "end"

_crew1 setbehaviour "combat"

_crew1 playmove "crouch"

~0.1

goto "loop"

#end

exit

Zay out  smile.gif

Share this post


Link to post
Share on other sites

well i have had a go at trying to make it work.. but guess wat! no luck at all.... so if some one could do a mission of a man in crouch mode that will be brill!

Share this post


Link to post
Share on other sites

In v1.46 , i do this like this

in the init line of the unit i want to crouch and stay like this

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setbehaviour "COMBAT"; this switchmove "Crouch"; this setunitpos "UP"; this setcombatmode "BLUE"<span id='postcolor'>

or if i had to use it in a trigger , instead of "this" in the above codes, the name of the unit

Then , when i want them to fire, i have a trigger with in the Activation "a side" detected by "the other side" and at the On Activation line

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">NameOfTheUnit setcombatmode "RED"<span id='postcolor'>

But as they sometime stand up when firing, i have to make another trigger (repeated this one) with

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">NameOfTheUnit setbehaviour "COMBAT"; NameOfTheUnit switchmove "Crouch"; NameOfTheUnit setunitpos "UP"<span id='postcolor'>

or

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">NameOfTheUnit setbehaviour "COMBAT"; NameOfTheUnit switchmove "Crouch"<span id='postcolor'>

i dont remember if i used the last part in the repeated trigger -NameOfTheUnit setunitpos "UP"-

But it is the same as the script up there

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  

×