OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started 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?
-
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.
-
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?
-
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
-
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 ::)
-
this is the multiplayer part...lol
Yes it is.......but you originally posted this in Editing/Scripting General and it was moved here.
Planck
-
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