Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Random Spawning  (Read 7192 times)

0 Members and 1 Guest are viewing this topic.

Cooked Auto

  • Guest
Re:Random Spawning
« Reply #15 on: 25 Apr 2005, 20:21:46 »
Terox: Got a question that I cant really figure out myself.
Im doing a Escape and Evade MP map where East must get to a certain point to win while West must then stop them.
And to spice things up I want to add random respawn. But just for the east side and not for west. How do I do that using your random respawn script? I want east to respawn randomly on Everon while West remains on a fixed position.
And I want east to start at a fixed position and then spawn randomly when they die.
Do you think its possible to make this work?
« Last Edit: 26 Apr 2005, 14:38:23 by Cooked Auto »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Random Spawning
« Reply #16 on: 26 Apr 2005, 15:37:55 »
Terox: Got a question that I cant really figure out myself.
Im doing a Escape and Evade MP map where East must get to a certain point to win while West must then stop them.
And to spice things up I want to add random respawn. But just for the east side and not for west. How do I do that using your random respawn script? I want east to respawn randomly on Everon while West remains on a fixed position.
And I want east to start at a fixed position and then spawn randomly when they die.
Do you think its possible to make this work?

YES

Each east Player would have a "Killed" eventhandler added to them

This would then run a random respawn script when they die which randomly setpo's them when they become alive again

MISSION EDITOR
1) Create as many gamelogics as you want random respawn positions
2) Set their placement radious so it covers a decent sized area each (This allows even more randomised positioning
3) name them logic1, logic2 etc
4) create a marker called respawn_east somewhere out of the playing area, say an offshore island



INIT.sqs
?(side player == east):player addEventHandler ["killed", {_this exec "Reborn.sqs"}]
tx_spawnpos = [logic1,logic2,logic3,logic4,logic5,logic6,logic7,logic8,logic9,logic10]

Reborn.sqs
Quote

@ alive Player
_countpos = count tx_spawnpos

#START
~0.1
;; selects one of the gamelogics at random
_pos = random _countpos
_pos = (_pos - _pos mod 1)
_position = getpos (tx_spawnpos select _pos)
Player setpos _position
exit

This type of mission would better lend itself to no respawn, makes the gameplay a bit more intense. Thats just mho, its your mission
« Last Edit: 26 Apr 2005, 15:39:40 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Cooked Auto

  • Guest
Re:Random Spawning
« Reply #17 on: 26 Apr 2005, 19:47:56 »
It worked! The only thing I noticed that it tossed me on the marker also. But that easy to fix really.

And I respect your opinion, this map isnt really for public. More of a private map I've done for some friends and me to play.

Thanks a lot. Random respawn was probably one of the most needed things for this map.