Jump to content
Sign in to follow this  
kovvalsky

how to make renegades (ENEMY side) use parachute or UAV?

Recommended Posts

Hi all!, I'm doing a DM mission in which players respawn into the air with a parachute.

To avoid Friendly fire, i set the rating of every unit to -3000 to make renegades but then they can't use "Open Parachute" action.

Any Suggestion to fix that?

Maybe with a Custom player action? but I will have the same problem if i try to use UAVs on my mission.

Maybe there is another way to avoid friendly fire? :j:

Thank you! and sorry for my poor english

Cheers!

Share this post


Link to post
Share on other sites

I'm frustrated, why DM mode has activated Friendly Fire?

I've tried with:

if (isServer) then {WEST setFriend [WEST, 0];};

and addRating too:

While {True} Do
{
_i = 0;
While {_i < Count AllUnits} Do
	{
	If (Rating (AllUnits Select _i) > -6000) Then
		{
		(AllUnits Select _i) Addrating ((- Rating (AllUnits Select _i)) - 3000); 
		};
	_i = _i + 1;
	Sleep 0.1;
	};
};

both ways works, all units become enemys. but still happening. I can not use the parachute or UAV. I no longer know what can i do..

Share this post


Link to post
Share on other sites

You can addAction with this code:

player action ["OpenParachute", player];

---------- Post added at 11:13 ---------- Previous post was at 11:01 ----------

I have a question related to this too.

How to detect when unit uses some sort of action? For example activate some code when he's ejecting from vehicle.

Share this post


Link to post
Share on other sites

I placed a paratrooper with init line this addrating -3000 and the open parachute action is not there. Seems like a bug to me. I went into the debug console and put in player action ["openparachute"] and it worked fine. Adding the action yourself seems like the only workaround.

---------- Post added at 11:13 ---------- Previous post was at 11:01 ----------

I have a question related to this too.

How to detect when unit uses some sort of action? For example activate some code when he's ejecting from vehicle.

if ([url="https://community.bistudio.com/wiki/animationState"]animationState[/url] player == "youranimationhere") then {your code here};

Edited by cobra4v320

Share this post


Link to post
Share on other sites

Hello,

i have a simillar question. (I pretty new to the arma scripting.)

I want to create enemy groups which attack all sides (opfor, blufor, and independent) but not eachother!

I'm creating units like this, but i can only create them 4 blufor, obfor, etc...

_group = createGroup <help me!! which side??>;
_unit = _group createUnit ["I_officer_F", _pos, [], 3, "NONE"];

How can i set the units as enemys for all sides without shooting eachother?

Thanks!

Share this post


Link to post
Share on other sites

yes, i need to know too..

my mission is a DM, with recruit option..

in my init.sqf i put this line to avoid Friendly fire:

WEST setFriend [WEST,0];

and on player Init and player Respawn to make renegades (ENEMY):

player addRating -10000;

in my tests can't do it..

_Soldier = (group player) createUnit ["B_Soldier_F", player modelToWorld [0,4,0],[],0,"FORM"]; 
_Soldier addRating (rating player); 
_Soldier joinAsSilent [(group player),2]
_Soldier disableAI "AUTOTARGET";

i think the path to do that is with FSM..

Edited by KoVValsky

Share this post


Link to post
Share on other sites

I tried that before, but the Units will attack eachother...

in my tests can't do it..

_Soldier = (group player) createUnit ["B_Soldier_F", player modelToWorld [0,4,0],[],0,"FORM"]; 
_Soldier addRating (rating player); 
_Soldier joinAsSilent [(group player),2]

i think the path to do that is with FSM..

isn't the line

_Soldier joinAsSilent [(group player),2]

useless? Because you created that unit with the group:

_Soldier = (group player) createUnit ["B_Soldier_F", player modelToWorld [0,4,0],[],0,"FORM"]; 

Share this post


Link to post
Share on other sites

yes, the only solution is

_Soldier disableAI "AUTOTARGET";

and you specify the target with the radio

---------- Post added at 07:16 ---------- Previous post was at 07:11 ----------

but in your case you can use Civilians:

Civilian setFriend [WEST,0];
WEST setFriend [Civilian ,0];

Civilian setFriend [EAST,0];
EAST setFriend [Civilian ,0];

...

use addWeapon to the Civs, or addUniform, etc...

Share this post


Link to post
Share on other sites

Hi thanks for the reply, but i cant use it, because west AI will attack civilian buildings...

thats not very nice :-)

I would like to have spawnable AI's like the ones in SA-Matras-Wasteland.

Edited by HerrVorragend

Share this post


Link to post
Share on other sites

im asking because what is the purpose of renegades when there are sides already, its not a free for all game. are they a independent hostile faction to everybody?

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  

×