Home   Help Search Login Register  

Author Topic: group respawn script  (Read 2319 times)

0 Members and 4 Guests are viewing this topic.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
group respawn script
« 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 :)

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: group respawn script
« Reply #1 on: 05 Jul 2006, 19:55:25 »
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.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: group respawn script
« Reply #2 on: 05 Jul 2006, 20:20:17 »
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
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: group respawn script
« Reply #3 on: 05 Jul 2006, 21:54:56 »
side respawn have never worked. It's the same as group respawn.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: group respawn script
« Reply #4 on: 05 Jul 2006, 22:39:27 »
omg, only once i would give an answer that really helps  ;D

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: group respawn script
« Reply #5 on: 06 Jul 2006, 02:04:10 »


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





Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: group respawn script
« Reply #6 on: 06 Jul 2006, 02:18:10 »
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...

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: group respawn script
« Reply #7 on: 06 Jul 2006, 02:45:18 »
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 ;)