Forum Jump :

Author Message


Posts: 18
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2017-11-05 18:23        
     
I'm making my own Zeus mission for Valtatie 5. I want to implement respawning in a similar way like Luetin09 in one if his videos.

The players start out as a OPFOR motorized group. At first I want the OPFOR players to respawn to the group they belong to. Once the group is dead, however, I would like them to change side to Independent and cause havoc against the remaining OPFOR players and AI.

I tried to look for ways to change units playable during the game but it seems impossible. Any ideas?

Added 21 hours 35 minutes later:

Has anyone ever come across something like this?

Added 1 hour 40 minutes later:

Okay, here's what I tried. I put the respawn type to GROUP. Then I made onPlayerRespawn.sqf which has the following:

_unit = _this select 0;
_grp = group _unit;
if (({alive _x} count units _grp) < 1) then
	{
	sleep 5;
	forceRespawn _unit;
	};
_group = createGroup independent;
[_unit] joinSilent _group;

It doesn't work. It says mission failed, because everyone is dead. Hmm.

This post was edited by coolrobot (2017-11-06 17:39, 17 days ago)