Jump to content
Sign in to follow this  
_qor

Help with ambush on convoy script

Recommended Posts

Hey,

I am trying to create a realistic ambush on convoy script to achieve the following sequence:

#1 convoy is led by an HMMWV (M2) and an external Delta Force group inside

#2 convoy detects enemies and immediately stops

#3 DF group gets out and attacks enemy together with HMMWV (M2)

#4 when area is clear, DF group gets back in HMMWV and the convoy keeps on following the preset waypoints

so far I created this:


waitUntil {velocity convoy1 select 1 == 0};

_c1pos = getPos convoy1;

skt = createVehicle ["Sign_sphere10cm_EP1", _c1pos , [], 0, "CAN_COLLIDE"];

skt attachTo [convoy1, [0, 0, 1] ]; 

skt enableSimulation false;

[color="#00FF00"]//convoy automatically stops because DF group wants to disembark when under fire/convoy's behaviour changes to "COMBAT" > check![/color]
[color="#FF0000"]// unfortunately, I dont get the leading convoy vehicle to freeze by attaching the SkeetDisc > solution?[/color]

waitUntil {behaviour leader convoyGuard == "AWARE"};

sleep 8;

{_x moveInCargo convoy1} forEach units convoyGuard;

[color="#FF0000"]//I dont get how to make the DF group reentering the convoy with animations/using assignAsCargo > solution?[/color]


waitUntil {{_x in convoy1} count units convoyGuard == count units convoyGuard};

convoy1 setBehaviour "AWARE";

detach skt;

[color="#00FF00"]//would make the convoy continue driving if attaching an object to convoy1 would freeze it ;)[/color]



Would be great if you have a solution to the problems stated in the script.

But there also is a strange behaviour I still dont understand:

It is a night scenario so the convoy has turned on lights. But when the enemy fires on the convoy, it first turns out the lights, starts to fire on the enemy and THEN the knowsAbout level reaches 0.105.

Although the behaviour changes to COMBAT when the lights get turned out. So this seems to be a more reliable way to check if a unit is under attack.

Is this a usual behaviour during night? It is said that units only fire when the KnowsAbout level is higher than 0.105 and not before!

thanks in advance

Edited by _qoR

Share this post


Link to post
Share on other sites

Don't know about the lights.

The vehicle has a driver, so he's going to drive regardless of what's attached.

You could have the driver disembark.

You could try commandStop or doStop on the vehicle driver.

You could try disableAI "MOVE" on the vehicle driver.

Use commands on "driver convoy1" and not "convoy1", so the command doesn't affect the gunner.

Use assignAsCargo along with ordergetIn to have them board the vehicle afterward.

Edited by OpusFmSPol

Share this post


Link to post
Share on other sites

Okay I will try out with disableAI "MOVE", that seems to be a good option I excluded so far due to some former problems.

But I also tried out the assignAsCargo way and it totally failed. Perhaps because the DF group doesnt belong to the convoy group and just has been movedInCargo.

Unfortunately add the vehicle by addVehicle to the group won't do the thing.

Anything I have to be aware of?

Share this post


Link to post
Share on other sites

try this:

{_x assignAsCargo convoy1} forEach units convoyGuard;
units convoyGuard orderGetIn true;

Works in an editor trigger.

Share this post


Link to post
Share on other sites

True!

I dont know why but I tried to write orderGetIn for each unit seperatly. That doesnt work!

Thanks!

Edited by _qoR

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  

×