Jump to content
Sign in to follow this  
Trapper

setUnitpos "UP" for Civilians

Recommended Posts

I initalize a default unarmed civilian with these lines:

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

_Civilian addweapon _Weapon

{_Civilian addmagazine _x} foreach _Magazines

group _Civilian setbehaviour "aware"

_Civilian selectweapon _Weapon

_Civilian setunitpos "UP"

I thought, he would always stand now, with his weapon ready to fire.

(Soldiers and Policemen that already have weapons do it)

But a civilian just walks around with his rifle/pistol on back and doesn't even use it if he or his group is attacked.

Just like "careless+holdfire".

Without setUnitpos "UP" the civilian has his weapon ready and fights, but he also lies down when under attacked.

Is there a way around it?

Share this post


Link to post
Share on other sites

"aware" is not neccessary, thats right, but removing it didn't change anything.

Solution:

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

_Civilian addweapon _Weapon

{_Civilian addmagazine _x} foreach _Magazines

_Civilian selectweapon _Weapon

~10

_Civilian setunitpos "UP"

Before you setunitpos "UP", add the weapon and wait around 10 seconds.

The civilian starts with added weapon on back, after a short while he gets the weapon ready.

Now it is possible to setunitpos "UP" without turning the civilian in somekind of "hold fire" mode.

Units that are created (createunit) without weapons seem to be in careless/safe mode until they are completely initiated. Setunitpos "UP" in the moment of initialisation lets them remain in careless/safe.

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  

×