Home   Help Search Login Register  

Author Topic: Respawning in waves  (Read 1238 times)

0 Members and 1 Guest are viewing this topic.

The_argyll

  • Guest
Respawning in waves
« on: 15 Oct 2002, 16:51:58 »
How can I make a group respawn in waves ? I would like it to work in two ways and for multiple spawnpoints :
Method 1: Players respawn in waves based on a timer (every minute or somethink like that)
Method 2: Players respawn in waves when there is a certain percentage of them dead.

Also, both respawns have to be inside BMP's as passengers

Can anyone help me with this please ?
« Last Edit: 15 Oct 2002, 19:26:48 by The_argyll »

Offline WhisperOFP

  • Members
  • *
  • I'm a llama!
Re:Respawning in waves
« Reply #1 on: 15 Oct 2002, 19:51:16 »
Hmmmmm....
Something not so easy I though of, is using Kegetys Spectator script.
Instead of having a respawnAsSeagull, put a base respawn, but, with a trigger (repeatedely, condition : not alive player, on activation : [player] exec "spectator.sqs"), start the spectator script once the player is dead.
Modify the spectator script so that it exits and close the dialog (and destroy the camera) when a global variable is set to true.
The spectator script is a script looping indefinitely following the camera target.
In the begining of the loop, put :
?stopSpectator:goto "ExitSpectator"

at the end of the spectator script, put
#exitSpectator
camDestroy _deathCam
closeDialog 2343534
stopSpectator=false
; use correct dialog ID
exit

So, whenever a player dies, he will be put on spectator mode, unable to move, ie, he is "dead".
When you want your respawn "wave" to occur, just set the stopSpectator variable on the server to true, then publicVariable it.
Every "dead" player (ie in spectator mode) will get out of spectator mode and will be able to control their player, ie the are "alive". setPos them to a correct location (assuming you put your respawn areas in such a way that dead players can't be killed a second time while in spectator mode).

Could work, but a little tough in handling client/server variable state.

Whis'

The_argyll

  • Guest
Re:Respawning in waves
« Reply #2 on: 15 Oct 2002, 19:55:09 »
Thanks. What if I wanted them to respawn as cargo in one of 3 vehicles (rusRespawnTruck, rusRespawnBMP1, RusRespawnBMP2) and they chose where to respawn using radio commands ? Also ! Will that work for only the East ? The Resistance should spawn normally at a spawn point.
« Last Edit: 15 Oct 2002, 20:21:05 by The_argyll »