Home   Help Search Login Register  

Author Topic: Disable any sort of respawn? so i can got it manualy?  (Read 1533 times)

0 Members and 1 Guest are viewing this topic.

CopyrightPhilly

  • Guest
hey chaps, like the topic title says

I want to disable any sort of respawn so i can manualy code it

(setdammage 0, setpos and so on)

works fine in the editor when shooting ai, but, when in mutiplayer is just zooms out of the soldier and thats it, it stops the code from respawing...

I do have respawn=none; set in my descrition file.

i can used the killed event handler because i'm making this one so its playable on 1.46...

any ideas?

juxie

  • Guest
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #1 on: 01 May 2005, 16:20:01 »
You probably could try this way...

make all the units exec a respawn script

In init.sqs:
Code: [Select]
; all your soldiers reference
soldiers = [a, b, c, d]

{[_x] exec "respawn.sqs"} forEach soldiers

or you could do this from editor under init field of unit:

Code: [Select]
[this] exec "respawn.sqs"

In respawn.sqs:
Code: [Select]
_unit = _this select 0
_unitPos = getPos _unit
_unitDmg = getDammage _unit
; continue to get whatever you want

@!(alive _unit)
deleteVehicle _unit
_unit = "soldiers" createUnit _unitPos

[_unit] exec "respawn.sqs"


Hope this helps


CopyrightPhilly

  • Guest
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #2 on: 01 May 2005, 16:21:52 »
thats more or less how mine is, its just when you die it starts to zoom out of your dead body, just like it normally would in single player.

[edit]

I have found a way to stop it doing this but i need to know if it would cause any lag on when playing it online.

if i change it from
respawn=none;

to
respawn=base;
respawndelay=36000;

it works fine, but as you can see 36000 is 10 hr respawn delay, now would this cause any unessery lag?

cheers, Phil
« Last Edit: 01 May 2005, 16:51:43 by CopyrightPhilly »

juxie

  • Guest
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #3 on: 02 May 2005, 03:35:46 »
another way to do it is probably to have a wait for a few seconds or @(condition) in the script..
then you wouldn't have to have a 10hr respawn delay?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #4 on: 02 May 2005, 11:15:22 »
I'm confused as to what specifically you want to do.

When a player dies and respawns as a seagul, they execute a script called

onPlayerRespawnAsSeagull.sqs
This file is internal to a scripts.pbo  found in the DTA folder

It used an internal eventhandler which returns the following elements

_player = _this select 0 (your dead body)
_killer = _this select 1
_seagull = _this select 2


You can create a copy of this file and edit it to your hearts content.
Then place it in your mission folder, it will then overwrite the BIS file

There are other files in their, that you can do the same too

these are:

onPlayerrespawnOtherUnit.sqs
onPlayerKilled.sqs
*********************************************************


If you state the specific criteria that you are trying to achieve, then we may be able to help further
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

CopyrightPhilly

  • Guest
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #5 on: 02 May 2005, 15:13:03 »
what i'm wanting to do is make my own respawn script, this is so i can try and delete each unit as they respawn (this will prevent and AI from respawning if someone quits) and also it will make it easyer to replace the defult respawn weapons.

i'll pull apart the dta file and see what goodies i can steal...

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #6 on: 02 May 2005, 19:56:31 »
well what you could do is deletevehicle them, if its a player, it wont delete, if its ai, it will

bear in mind where to run the code

if the unit is in a group which has a player leader, it is local to the players pc

any other instance its local to the server

and the best way to do this is by attaching a "Killed" eventhandler to the unit and run a script from it

or by simply editing one of the scripts in the scripts.pbo found in the DTA folder and placing the edited  version in your mission folder
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

hermano

  • Guest
Re:Disable any sort of respawn? so i can got it manualy?
« Reply #7 on: 06 Jul 2005, 16:33:10 »
I tried to write my own respawn script too, wouldn't work (at least if respawn = none in description.ext - and that's what I needed, well found a different solution for my problem).
Have a look at this, mapfact created a different respawn, shouldn't be too hard to do your own then :
http://www.mapfact.gamigo.de/include.php?path=content/download_eng.php&contentid=385
h