OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Garcia on 05 Jul 2006, 17:19:45
-
Ok, simply, I remember sometime back in the days there was a script that let you respawn into another group when your group was out of units to respawn into. I need that script. Anybody got it? I've looked through my HDD without finding it, OFPEC doesn't have it after the crash, so I just hope somebody else got it lying in their HDD :)
-
afaik there is no script needed for this. you just define respawn type in your description.ext
Just define it as respawn=side and you'll respawn in another unit on your side as long there are.
For easy description.ext making look for Chris's OFP script editor (somewhere on ofpec.com) which contains a description wizard.
-
afaik there is no script needed for this. you just define respawn type in your description.ext
Just define it as respawn=side and you'll respawn in another unit on your side as long there are.
For easy description.ext making look for Chris's OFP script editor (somewhere on ofpec.com) which contains a description wizard.
i think you'll find respawn side doesnt work, afaik
-
side respawn have never worked. It's the same as group respawn.
-
omg, only once i would give an answer that really helps ;D
-
This is possible
I think the simplest way is to run a killed event handler on each unit in the group
On death, the killed event script would then check how many units were still alive in the group
when it reached the crucial level, of 1 man standing (For a group with only 1 playable slot), it is at this point that you would search available groups and then simply have your unit join 1 that had less than 12 men in
to create a "spawn into" unit on the groups 11th death and then use the 13th unit (placed in a safe location) as a vehicle to join another group takes a little more effort and more problems to overcome
ofcourse the whole system gets even more complicated when you have multiple player slots in a group
for multiple player slots, to find out how many units were AI etc you would have to
a) count the number of units in the group
b) subtract the number of units that were local to the player from the total group count (for each player)
c) and do a slightly different calc for the group leader, if he were a player
coc network services would be a very suitable tool to create a decent system here
-
I think I tried this, but it didn't work. Don't remember if I tried with EH or not. I'll give it a shot with EH. It would actually be quite simple if I could just use EHs, because the thing is, I need the player to always be alone in his group, but I don't want to base respawn him. So the best thing would be to add an array of units that he can respawn into, and then when he dies, he respawns into one of these units, which again will be joined to grpNull...
-
actually I got it working using a killed EH. Last time I tried I failed because the script executed in the EH takes too long. So I added the join-line in the EH itself, and it works. So thanks for the input, guess I can lock this one ;)