OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Rysumm on 07 Jul 2004, 05:03:09

Title: Respawn question
Post by: Rysumm on 07 Jul 2004, 05:03:09
I have 6 soldiers. How do I make it so I can only respawn into 5 of the soldiers?
Title: Re:Respawn question
Post by: Dubieman on 07 Jul 2004, 05:17:34
A little more info would be nice but I think this is the wrong place to post this since it should be in the multiplayer part of the forums.
Title: Re:Respawn question
Post by: Rysumm on 07 Jul 2004, 06:46:55
Ok, I have 6 players in my squad. One is a helicopter and I want to be able to respawn all the players except for the helicopter.  could this work with a command or something that could be added to the initialization field of the helicopter?
Title: Re:Respawn question
Post by: Terox on 07 Jul 2004, 16:06:22
if you mean one is the pilot of the helicopter

Respawn type and delay are set by the description.ext
They cannot be maniupulated or changed by internal mission scripts

If you have respawn for one playable unit then you have it for all

What you can do however is attach an addeventhandler "Killed" to the pilot unit and on his death the script that the eventhandler runs  setpos him to somewhere out of the way and place the unit-player in a cutscene for the rest of the mission

****************************************************************************************

If you try to return the value of "Respawn" as stated in the description.ext

eg

hint format["Respawn = %1",respawn], it returns a "scalar bool array string oxfcfffef" error


There is  likely to be a reserved variable name for "respawn" and if you knew it then maybe you could manipulate it. I asked the question some time ago and got nil replies









If you mean, you want to use the respawn type that allows you to respawn into an existing AI unit in your group, then simply have the pilot slot in its own group, independant to the rest
Title: Re:Respawn question
Post by: TH on 08 Jul 2004, 01:17:57
I think this is the wrong place to post this since it should be in the multiplayer part of the forums.

this is the multiplayer part...lol  ::)
Title: Re:Respawn question
Post by: Planck on 08 Jul 2004, 22:13:07
Quote
this is the multiplayer part...lol  

Yes it is.......but you originally posted this in Editing/Scripting General and it was moved here.


Planck
Title: Re:Respawn question
Post by: Zombie on 09 Jul 2004, 12:13:17
terox hit the nail there.  You may start with a helicopter, but when it is destroyed, it won't come back w/o other scripting.   I'm not good with eventhandlers, but a trigger like this would work:
condition: alive player6 and !driver chopper1
on activation: player6 join grpnull

That way your group respawn won't respawn you into that unit, but the poor player of player6 will be orphaned.
  If you don't mind a pilot without a ride running around, you really don't need to do anything.  Vehicles don't "respawn", new ones can be created if a vehicle is destroyed using another script