Jump to content
Sign in to follow this  
Huk256

Trying to capture enemy vehicle - weird LAW/RPG soldier behaviour...

Recommended Posts

Hello again.

Here is an interesting problem I got for you today...

Situation:

I am in the middle of creating a mission, in that mission I would like to be able to capture damaged enemy tanks but something is not right...

I got an RPG soldier, an enemy tank and a script that kills the tank crew when they jump out of it. RPG soldier is firing his weapon... BUM the crew jumps out and are killed instantly, I got myself a new tank - great... but there is the problem - that moron with the RPG is STILL firing at the tank, even thought it is empty already...

I tried revealing the tank (rpgSoldier reveal tank) - he is still firing, I tried setting the tank captive after the crew gets out - but he is still firing at it

what is worse - if I teleport the - now empty - tank to the location with other (unrelated) rpg/law soldier - he will fire at the tank as well!

After few hours of experimenting I found out the following:

1.If I set "engineOn false" on the tank, it is no longer considered a threat by the soldier at teleport location - strange but true - but it is STILL fired upon by the first rpg/law soldier.

2.To force him to stop firing, either him or his leader needs to get very close to the tank (less then 50 meters).

Currently I use the following script to make tank "captive":

_group=_this select 0;
_observer=_this select 1;
_target=_this select 2;
_units=_this select 3;

_leaderGroup=leader _group;

_observer setdamage 0;
_observer moveindriver _target;
_observer reveal _target;
_units joinSilent _observer;
_units joinSilent _leaderGroup;
_observer setpos [9999999,99999999,0];

but as you can see it is pretty ugly solution, because we have to pass the group with the rpg soldiers, the observer (a civilian that will reveal the vehicle for us), the target we want to reveal and the rpg soldiers array, and we have to do that for every vehicle on the map we want to protect (yes, I know there is a lot of room for improvement for this script ;] ).

I believe that simple reveal command should be sufficient here, that would make it easy to "reveal" empty targets...

I also believe there is a bug here - setCaptive command doesn't stop the first rpg/law soldier from firing at the tank - I think it should.

Either way - if somebody knows any better solution for capturing vehicles please let me know.

Thanks in advance and sorry for any spelling errors ;]

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  

×