Home   Help Search Login Register  

Author Topic: spawn killing  (Read 1338 times)

0 Members and 1 Guest are viewing this topic.

xXNismoXx

  • Guest
spawn killing
« on: 03 Jan 2004, 02:49:48 »
how can I make it so if west player kills east player in spawn, all west players die? and vise versa?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:spawn killing
« Reply #1 on: 03 Jan 2004, 14:58:07 »
very difficult if u r new to scripting
If you are making a player v player map it is even moreso

Basically you need to have a trigger area for each safezone which does nothing other than create a list of players within it

Then you need to add "Hit" or "Killed" event handlers to all players and remove and re add them every time a player dies

You need to create an array of east and west players and update that list every time a player respawns

then you have to decide what you want to do with the victim and what you want to do with the Shooter.

It is quite complicated

If you want to try then rip apart any one of the EFL templates at the following links.

http://www.euro-flashpoint-league.com/Downloads/maps/efl_templates.zip

They have an anti spawn killing system that
It punishes the shooter every time a player wounds or kills an enemy player, if either player were in a safezone area called a "Spawnkill area"

by

1) Looks at a player every time he is hit  or killed (uses "hit" add event handler)
2) If the victim or the shooter are in a "Spawnkill" trigger area, it then
3a) If victim is only wounded, repairs him back to full health
3b) If victim is killed, it 0.1 seconds later respawns him where he died with the weapons he died with in the direction he was facing (as if he was never killed)
4) The "Shooter" of this illegal wounding / killing is immediately killed, and then respawns into a cutscene where he remains for 5 minutes unable to do anything

Each player runs a respawn script , the respawn delay is set to 0.1 seconds, and the cosmetic respawn delay effect is created by running a cutscene for x amount of seconds every time a player normally respawns

The specific scripts you need to look at are
a) Everything in the "Spawnkill folder"
b) Common/respawn script
c) Some variables are declared in the Init.sqs

and also look at each sides spawnkill triggers


The system can easily be adapted for anti tk's in each sides safezones as well
« Last Edit: 03 Jan 2004, 15:00:40 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

xXNismoXx

  • Guest
Re:spawn killing
« Reply #2 on: 04 Jan 2004, 09:58:51 »
thanks alot Terox, i'll give it a go  :)