Home   Help Search Login Register  

Author Topic: Number of lives?  (Read 1048 times)

0 Members and 1 Guest are viewing this topic.

redmenace

  • Guest
Number of lives?
« on: 02 Dec 2005, 21:29:10 »
Is there a way to set a number of lives for respawning in a multiplayer mission? For example, I want it to be so you respawn three times, and then respawn as the bird or whatever.

thanks

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Number of lives?
« Reply #1 on: 02 Dec 2005, 21:49:14 »






It is possible to simulate this.

For normal "Respawn at base marker"
Basically run a killed event handler on each player.
At each death have the killed event script increment, or count down a life after each death
If that deatcount reaches your limit, then run a cutscene on the player

or
Using group respawn
have each player in his own group with only 2 ai
Have these ai placed somewhere out of harms way, and have the
disableai "move",  
command run on each of these ai so they cannot be called upon to be used by the player
(When he spawns into them he will have normal movement)
Then again using a script run from a killed event handler have this setpos the player back into the game area


___________________________________________________________

The group respawn system

DESCRIPTION.EXT
respawn = group
respawndelay = 1

MISSION EDITOR

For each player, create 1 playable slot and X non playable slots in the same group
Create X many non playable AI as you want respawns
In the  non playable slots, place the following code in their init fields


this disableai "move"

and place these two units on an offshore island, out of harms way

Place a gamelogic, (lets name it "teleport") wherever you want the  player to setpos too, after respawning



INIT.SQS
Quote
tx_spawn = player addEventHandler ["killed", {_this exec "teleport.sqs"}]

TELEPORT.SQS
Quote
Player removeEventhandler tx_spawn
@ alive player
player setcaptive true
tx_spawn = player addEventHandler ["killed", {_this exec "teleport.sqs"}]
Player setpos (getpos teleport)
~1
player setcaptive false
exit
« Last Edit: 02 Dec 2005, 21:52:58 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

redmenace

  • Guest
Re:Number of lives?
« Reply #2 on: 03 Dec 2005, 19:03:37 »
I'm also using Toadlife's universal multiplayer weapons respawn or whatever the fuck its called. lol.

Is there a way to set a number of respawns in that script by any chance?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Number of lives?
« Reply #3 on: 03 Dec 2005, 22:33:40 »
Did the script not come with instructions?


Planck
I know a little about a lot, and a lot about a little.