Home   Help Search Login Register  

Author Topic: Respawn as a group  (Read 1056 times)

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Respawn as a group
« on: 04 May 2008, 09:15:13 »
I was wondering if there are any scripts already out there to make a whole group respawn after every member in the group is dead.

I want this type of respawn because it will limit those akward times when you have 2 guys back at a base and 2 still out in combat. This way you can insert as a whole group again.

Maybe there can be a parameter that once X number of group members die respawn the dead group members.

P.S. Eat the cheese!
TS3 IP: tor.zebgames.com:9992

Offline Barbolani

  • Members
  • *
Re: Respawn as a group
« Reply #1 on: 05 May 2008, 16:33:08 »
Hi,

Check this thread.

http://www.ofpec.com/forum/index.php?topic=31407.0

You can just change the number of countunits to 2 or whatever

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Respawn as a group
« Reply #2 on: 05 May 2008, 19:55:32 »
I don't see how that works/helps.

Is it clear what I am looking for?

A script that counts the number of men in your group. Then once the whole group dies it respawns whole group back at a base. These should be PLAYABLE characters.
TS3 IP: tor.zebgames.com:9992

Offline Barbolani

  • Members
  • *
Re: Respawn as a group
« Reply #3 on: 06 May 2008, 13:29:02 »
Yes, it helps indeed, you just modify the script with this:

Quote
_marker1 = _this select 0
_units = _this select 1

_group = group player

_countunits = _units

#Update1

"soldierEB" createUnit [getMarkerPos _marker1, _group]

_countunits = _countunits -1

? _countunits > 0 : goto "Update1"

{_x setplayable} foreach units _group

_countunits = _units

#Update2

{alive _x} count units _group < 2: goto "Update1"

sleep 15

goto "Update2"

exit


At the beggining place the player. Place a marker at the base, call it whatever

Exec the script with [nameofmarkerspawnpoint, , numberofunitsinthegroup] exec blahblah.sqs in some init field or whatever.

Then the units are created at the marker position. When all the units die, after 15 seconds they respawn at the marker, EDIT: and after that they are playable.

You cand modify the script so you have the respawn when more or less units die, join the group after respawning instead of being created in your group etc... Its just an idea..

EDIT: I havent tested this....
« Last Edit: 06 May 2008, 18:08:52 by Barbolani »