Home   Help Search Login Register  

Author Topic: Respawning  (Read 30337 times)

0 Members and 2 Guests are viewing this topic.

DBR_ONIX

  • Guest
Re:Respawning
« Reply #75 on: 09 Jan 2005, 15:34:37 »
What about making the other side's respawn in a remote island or something, and have a trigger (that call's a script) that moves the people to a locked heli or something?

Code: [Select]
_unit = _this select 0
_heli = _this select 1
_unit moveincargo _heli
exit

And in the trigger activation feild :
[this,heliname] exec "script.sqs"

- Ben

newb

  • Guest
Re:Respawning
« Reply #76 on: 14 Jan 2005, 04:19:47 »
hey i dont mean to hijack... but since everyone is talking about respawning i just thought i might ask.

Is non-playables respawnable in MP?
« Last Edit: 14 Jan 2005, 04:20:20 by newb »

Lt.Ryan

  • Guest
Re:Respawning
« Reply #77 on: 15 Jan 2005, 05:35:01 »
Hey I played a MP mission that had spwan pionts and as we advanced up the road the spawn pionts would move with us. Any one have an idea how do do this. I would love to use it in some of my missions.

 :cheers:

Richard99

  • Guest
Re:Respawning
« Reply #78 on: 16 Jan 2005, 03:18:06 »
Simple Question 4 u, does respawn side  actual work now.
 i can get all the other 2 work bar that 1 ?
thanks

Serial Killer

  • Guest
Re:Respawning
« Reply #79 on: 29 Jan 2005, 10:35:54 »
If I use that base respawn with a FDF units, there is a little problem..
When they have respawned, they'll get AK47 >:( I want that they get RK62 ( FDF weapon ) or something like that..

Can anyone help me?
« Last Edit: 29 Jan 2005, 10:36:33 by Serial Killer »

Rocko Bonaparte

  • Guest
Re:Respawning
« Reply #80 on: 08 Feb 2005, 17:07:51 »
I just had an anomaly testing a mission last night.  I have teamspawn enabled, and it has worked flawlessly ever since until now.  I was squad leader and got bagged.  Normally, when I am team spawned, I will resume command of the group.  This time, it didn't happen.  The rest of the quad went stupid and we couldn't get them to do what we wanted.

Well, technically the rest of the squad wasn't near me.  It was possible they were all dead.  However, they were showing up on my Recruit-level screen, although they weren't moving.  Does this actually happen often?



Quote
hey i dont mean to hijack... but since everyone is talking about respawning i just thought i might ask.

Is non-playables respawnable in MP?
Yes -- I was working on a mission for respawning tanks, and the non-playable tank crews would respawn without a problem.

Edit: Actually no, I just made them playable but I forgot that I had written a ton of code to make them function like AI if they weren't human controlled.  Fooled by my own machinations.
« Last Edit: 09 Feb 2005, 00:37:33 by Rocko Bonaparte »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Respawning
« Reply #81 on: 08 Feb 2005, 21:30:30 »
hey i dont mean to hijack... but since everyone is talking about respawning i just thought i might ask.

Is non-playables respawnable in MP?


NO

*************************************************************
*************************************************************
*************************************************************

Hey I played a MP mission that had spwan pionts and as we advanced up the road the spawn pionts would move with us. Any one have an idea how do do this. I would love to use it in some of my missions.

 :cheers:

Init.sqs
player addEventHandler ["killed", {_this exec "myrespawn.sqs"}]

MyRespawn.sqs
Player removealleventhandlers "Killed"
@ alive player
Player setpos  (getpos objectname)
or
Player setpos (getmarkerpos "markername")
player addEventHandler ["killed", {_this exec "myrespawn.sqs"}]

*************************************************************
*************************************************************
*************************************************************

If I use that base respawn with a FDF units, there is a little problem..
When they have respawned, they'll get AK47 >:( I want that they get RK62 ( FDF weapon ) or something like that..

Can anyone help me?


The following will give the unit the weapons it started with

Unit's Init field
_this addEventHandler ["killed", {_this exec "unitspawn.sqs"}]

MyRespawn.sqs
_unit = _this select 0
_unit removealleventhandlers "Killed"
_weapArray = weapons _unit
_magArray = magazines _unit
_primary = primaryweapon _unit
@ alive _unit
removeallweapons _unit
_unit addEventHandler ["killed", {_this exec "unitspawn.sqs"}]
{_unit addMagazine _x} forEach _magArray
{_unit addWeapon _x} forEach _weapArray
_unit selectWeapon _primary


alternatively you can specify a different loadout

@ alive _unit
removeallweapons _unit
_unit addmagazine "XXXXX"
_unit addmagazine "XXXXX"
_unit addmagazine "XXXXX"
_unit addweapon "XXXXX"

« Last Edit: 08 Feb 2005, 21:31:10 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Demitron Rage

  • Guest
Re:Respawning
« Reply #82 on: 09 Feb 2005, 02:49:56 »
Ok, Im completely new to the editor. I have my map made. I just want to know how to make the respawn infinite. I just want the west to respawn at the base when they die. I figured out the description.ext file but is that all I need to type is respawn=3 respawndelay=2 and how do I place a maker for the respawn. I need details on that. I need to know what all to type in this file and where to put it. For example, do I need to make a folder and put the 2 together or what. I cant figure out why name the file description.ext and not the name of the map? I know Im asking 20 questions here but I can understand better if I knew why or how. Thanks for any help.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning
« Reply #83 on: 09 Feb 2005, 04:25:57 »
Most if not all the info you require on respawn is contained in this thread.

If you want it badly enough try reading through it.

Not all missions require a description.ext file, but those that do have it contained in the same folder or pbo as the mission.sqm.

The description.ext is used to set up various things for a mission......for instance music, sounds, identities....etc.....etc.

And of course the respawn parameters.

If you have the parameters listed in the description.ext then that is basically it.

Anyway read through the thread and glean the relevant info, it will save my poor fingers from extra typing.


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

Neptune

  • Guest
Re:Respawning
« Reply #84 on: 03 Mar 2005, 16:12:41 »
The mission "Real-Paintball" has an EXCELENT round-respawn script.  8) :o
I tried to understand the script, but in vain.

I allso tried to make a certain script my self...allso in vain.

Is there a script like that out there? I would REALLY like to know how to do this!  :-\

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning
« Reply #85 on: 30 May 2005, 20:27:30 »
Another sticky bites the dust.

The important information contained in this topic has been condensed into a Mini-tutorial document type thing, and is available in the Editors Depot here: -

http://www.ofpec.com/editors/resource_view.php?id=829

*Topic now unstuck*


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

Rocko Bonaparte

  • Guest
Re:Respawning
« Reply #86 on: 14 Jun 2005, 02:45:50 »
OK I'll move my respawn question over to here as it is fundamentally an MP respawn question--albeit asked in a rather wacky way.  I've done a bunch of respawn code before, so I'm not completely oblivious.

What I'm trying to do is change the unit type of the player based on a squad they choose.  When this squad all is dead, they can pick a new one and spawn as that squad instead.  It's all very tricky.

So I figured out that I can't set the player to a created unit.  The hack I'm trying is to team respawn into the desired group.  Say, if I want the player to change from his base unit type to a sniper, I create the sniper first as a part of his group, and he can spawn into it.

The problem I have is when the squad is all expired--seagull time.  The trick I tried was to IMMEDIATELY create a new unit for the squad to spawn into.  This doesn't work.  I think the game sees that at the moment I died, there was nobody else in my squad, so I went seagull even if I added another unit a split second later.

The last thing I haven't tried is a custom death handler.  All I'm hoping is that handler is called before OFP takes over and seagulls me.  

As for some amusement, I tested this all out with some kind of round-robin death script.  With two guys at the start, I'd spawn a new person into the group immediately after the next died.  I'd have the player die every 10 seconds.  So I just sat there, watching myself skip from body to body to body; they started to pile up.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Respawning
« Reply #87 on: 14 Jun 2005, 15:35:24 »
for group respawn
you need an additional body in the group already alive before you die

this is easy enough, as all you need is a killed eventhandler attached to the guy which counts the units in his group after each respawn and if that count is less than 2 always create an additional unit

then to have him spawn into a soldier of of a different class type, simply create that soldier type somewhere safe and then have your player join that unit's group, kill the players soldier and hey presto, you are now a soldier of a chosen class type , then immediately rejoin your initial group and setpos yourself back to a starting position
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Rocko Bonaparte

  • Guest
Re:Respawning
« Reply #88 on: 14 Jun 2005, 17:54:55 »
I did notice that if I started creating new guys before the last one dies, I can keep respawning people.  That was an amusing test, as I watched the bodies pile up as the script merrily killed the player every 10 seconds.  ;D

I think it would be confusing to have that last guy showing up in the command bar because he could always be given orders and otherwise manipulated.  I'd have to script it so that guy cannot be manipulated, and take it on faith that everybody playing the mission wouldn't get completely confused.

Unfortunately, I doubt that.

Offline Clayborne

  • Members
  • *
Re: Respawning
« Reply #89 on: 21 Feb 2010, 13:12:13 »
Ok so I have a mission that uses an updating respawn zone as the players progress. The reason for using this instead of group respawn is that the mission takes place in a structure I have built, and the AI just run through the walls if they are in formation.

What I would like to know is, if I have two playable characters, named for example player1 and player2, will they still be called player1 and player2 after dying and respawning?

At the end of the mission I want both players to be setpos'd to a specific location, but obviously player1 setpos getpos whatever will not work if the player isn't called player1 anymore.

If this is the case, how can I make sure the players have names so I can setpos them later? Just give each player their own respawn script that will keep renaming then when it runs, or is there an easier way?