Jump to content
Sign in to follow this  
mikeap

Empty UH60 still part of BLUEFOR??

Recommended Posts

Hello all,

I'm making a mission where you have to secure a crashed UH60, then blow it in place.

Everything works, but when I blow the empty, damaged UH60, my team will turn and shoot me.

I'm placing the Uh60 from empty-air, so it's not assigned to the BLUEFOR.

Is there a way to get the empty UH60 to switch sides to OPFOR?

I tried setcaptive, which didnt work.

There seems to be a snag, and cant switch sides because its not an active AI.

Does anyone have a work around? I've already delt with the -7000 points that I incur from destroying the helicopter.

Thank you.

Edited by MikeAP

Share this post


Link to post
Share on other sites

for a dirty workaround you can try setcaptive true on yourself just before you blow it.

or assign a hit eventhandler and when damage is above 0.99 you setDamage it instead to 4 (4 is violent explosion i think). maybe that will make AI believe script "killed" it and not you.

Share this post


Link to post
Share on other sites

Or you could assign +7001 points to whoever get the kill for the UH60

Share this post


Link to post
Share on other sites
Or you could assign +7001 points to whoever get the kill for the UH60

Already did that.

My AI squad still shoots at me, because they see it as me attacking a friendly entity

Share this post


Link to post
Share on other sites

An even dirtier workaround would be to make an OPFOR unit jump into the heli, then jump out and move somewhere else on the map and die?

Share this post


Link to post
Share on other sites

This should place an OPFOR unit in the vehicle and then delete him right away. Not tested... but looks like it should work if that split second is enough to make the vehicle OPFOR.

_group = creategroup east;
_dude = "RU_Soldier" createUnit [[0,0,30], _group];
_group assignAsCargo _veh;
[_group] moveinCargo _veh;
deletevehicle _dude;

Edited by twirly
Corrected an error

Share this post


Link to post
Share on other sites

what twirly is suggesting sounds like a good ide, also you can try a few changes if the first does not work:

here it waits until he is in vehicle and then spawn a unarmed west unit 5 meters to the east of the vehicle and makes west unit look at veh and when he knows all about it (4) he reveals vehicle to all west units and then deletes both of them.

_group = creategroup east;
_group1 = creategroup west;
_dude = "RU_Soldier" createUnit [[0,0,30], _group];
_dude assignAsCargo _veh;
_dude moveinCargo _veh;
waitUntil {_dude in _veh};
_dude1 = "soldierWB" createUnit [[(getPos _veh select 0)+5,getPos _veh select 1,0], _group1,"removeAllWeapons this"];
_dude1 doWatch _veh;
waitUntil {(_dude1 knowsAbout _veh) == 4};
{if ((side _x) == west) then {_x reveal _veh}} foreach allUnits;
{deletevehicle _x} foreach [_dude,_dude1];

Edited by Demonized

Share this post


Link to post
Share on other sites

Maybe you and/or your team is too close to the chopper and gets hurt?

Can't believe destroying the empty chopper affects your ranking.

Share this post


Link to post
Share on other sites

no, i did test myself, group is on safe distance and they kill me when i satchel the heli.

---------- Post added at 03:48 PM ---------- Previous post was at 03:10 PM ----------

This should place an OPFOR unit in the vehicle and then delete him right away. Not tested... but looks like it should work if that split second is enough to make the vehicle OPFOR.

_group = creategroup east;
_dude = "RU_Soldier" createUnit [[0,0,30], _group];
_group assignAsCargo _veh;
[_group] moveinCargo _veh;
deletevehicle _dude;

group should be dude in assignas movein

And i did tests with my own, moved russian unit into vehicle, spawned a west unit and made him wach it and then deleted units after west unit saw it as an enemy and satcheled the heli, my own group still kills me. and i dont get it.

Share this post


Link to post
Share on other sites

Ok, a more elegant solution is to (when the time is right, i.e when given the order to satchel the heli). Make your unit join a civilan, then make the civilian join grpNull. Blow up the chopper, then when the chopper is blown up, rejoin the original group.

Empty Vehicles are assigned to side "CIV". This also applies to any vehicles that HAD people in them, for instance you could put a bunch of soldiers in the vehicle... then kill them and it will STILL be Civilian. Same goes for moving units in and out.

Share this post


Link to post
Share on other sites

I just found the solution to this same exact problem:

In the editor place a low ranking and manned UH-60 (blue icon), then create an opfor unit (any type) with the rank of colonel.

Set the opfor unit's probability of presence to 0% and make the UH-60 and the opfor unit in the same squad

then put this in the UH-60s init line

g1 = driver this;

g2 = this turretunit [1];

g3 = this turretunit [0];

g1 setpos [0,0,100];

moveout g2;

deletevehicle g1;

g2 setpos [0,0,100];

deletevehicle g2;

g3 setpos [0,0,100];

deletevehicle g3;

The opfor unit changes the blackhawks side to OPFOR, then we move the crew out of the blackhawk and delete them.

Confirmed as working!!

Special thanks to pbishop!

Edited by Wraith_V

Share this post


Link to post
Share on other sites

I use the below. The blackhawk has to be destroyed by satchels though.

place in the init of the blackhawk:

this setDamage 0.9;
this lock true;
[this] execVM "c4only.sqf";

FILE: c4only.sqf

//Original by Xeno

_obj = _this select 0;
_alive = true;

_obj setVehicleInit "this allowDamage false"; processInitCommands;

While{_alive} do {
sleep 1.0;
_bomb = (getPos _obj nearObjects ["PipeBomb",10]) select 0;	

if(not isNull _bomb) then {
	//latk = (_bomb nearObjects ["Man",10]) select 0;
	latk = nearestObject [_bomb, "Man"];
	WaitUntil {not alive latk or isNull _bomb};
	if(isNull _bomb) then {
		_obj setVehicleInit "this allowDamage true"; processInitCommands;
		_obj setDamage 1;
		if(getDammage _obj == 1) then{_alive=false};
	};
	if((not alive latk) and (not isNull _bomb)) then {deletevehicle _bomb; latk = objNull};
};
};

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  

×