Home   Help Login Register  

Author Topic: Respawning  (Read 49169 times)

0 Members and 1 Guest are viewing this topic.

Pope_Zog

  • Guest
Respawning
« on: 20 Aug 2002, 14:24:18 »
Adding Respawning
Create a new text document inside your mission directory. Write the following in this document:
Code: [Select]
respawn=2;
respawndelay=20;

The value respawndelay is in seconds. Codes for respawn are below.

Save and close the document and rename it to description.ext
Make sure your system is set to display file extensions so that its name doesn't accidentally become "description.ext.txt".

Remember to set your units as playable in the editor. If you use the setting above they will now respawn where they died after 20 seconds.

Respawn Codes

  0 (or "NONE")
  - No respawn. The camera zooms slowly out from the player's corpse.

  1 (or ["BIRD"])
  - Respawn as a seagull after respawndelay.

  2 (or "INSTANT")
  - Respawn at the place of death after respawndelay.

  3 (or "BASE")
  - Respawn at a random spot in the side's marker zone after respawndelay.
    The names of the different zones are:
        West: respawn_west
        East: respawn_east
        Resistance: respawn_guerrila
        Civilians: respawn_civilian

  4 (or "GROUP")
  - Respawn into any alive AI in the player's squad after respawndelay.
    If noone is left then the player respawns as a seagull.

  5 (or "SIDE")
  - Exactly the same as number 4 (GROUP) - at least in v1.46.

Two pitfalls must be pointed out before you start testing:

 1. Note that respawning will not work if you run the mission from the editor. You will have to Save and Export to Multiplayer, exit the Mission Editor, select Multiplayer, create a new server, select your mission, and test it.

 2. If your rename your mission when exporting it, you'll be in trouble. The editor only copies the mission.sqm file and ignores everything else :( It's easier to rename the mission folder in Windows before opening it in OFP and then exporting it with its new name.

Pope Zog
« Last Edit: 12 Nov 2002, 14:01:08 by Pope Zog »

Tomahawk

  • Guest
Re:Respawning
« Reply #1 on: 29 Aug 2002, 13:48:17 »


[attachment deleted by admin]

US-NATO_Term

  • Guest
Re:Respawning
« Reply #2 on: 16 Sep 2002, 00:08:07 »
can u make markers appear? like if i made a coop wheres theres no respawn, and once the black ops do the mission, i skip time, i kill off all the players, and then the marker appears on the map, and they respawn at like an air port, so they do another mission later that day???

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Respawning
« Reply #3 on: 16 Sep 2002, 00:47:56 »
No need to post your question in two places, esspecialy not highjacking another thread for your purposes.  If someone knows the answer to your question then they can reply in the thread you have already made here

US-NATO_Term

  • Guest
Re:Respawning
« Reply #4 on: 16 Sep 2002, 02:44:09 »
 :'( srry but thats a different question, and i forgot to ask for replies, :booty: lol,  and i made my post after i put that in, since his was dealing with respawn i tohught if someone awnsered my question in there ppl would  get another way of respawn??

Pope_Zog

  • Guest
Re:Respawning
« Reply #5 on: 16 Sep 2002, 12:04:24 »
This thread was intended for reference only - to dispose with the umpteen posts on the old board asking essentially the same questions.

I guess it's time to add this info to the Editor's Depot.

Happy scripting,

Pope Zog

Pope_Zog

  • Guest
Re:Respawning
« Reply #6 on: 12 Nov 2002, 14:12:51 »
The Norwegian author Arne Garborg once said: "I am an honest man, and therefore I can change my mind."

So this is what I'm doing as well. This thread is now open again for any and all suggestions, comments, hints, tips or remarks regarding respawning.

Pope Zog

Kraz

  • Guest
Re:Respawning
« Reply #7 on: 15 Nov 2002, 03:23:19 »
So essentially if I want to create a "hold the town" mission with an unending supply of respawning enemies all that I need to do is:

Create the respawn_east marker
make all of the enemy squads "playable"
and specify the respawning the the description.ext file as
Respawn=3
respawndelay=20
 ?
I don't want the defenders to respawn (including the player(s))
and Im pretty sure I've tried this but I have yet to see an unending wave of badguys..
Thanks

Pope_Zog

  • Guest
Re:Respawning
« Reply #8 on: 19 Nov 2002, 14:46:46 »
Are we talking a) Single Mission or b) Multiplayer?

a) It won't work. There's no respawn at all in SM/SP.
b) Well, yes. But what happens if a player chooses to play as the enemy? Is that OK?

Pope Zog

Commando

  • Guest
Re:Respawning
« Reply #9 on: 27 Nov 2002, 17:34:51 »
How do I make a multiplayer mission where there will be
A: CUSTOM MUSIC

B: RESPAWN

All my atempts to make a description.ext file with both features have failed.
Earlier I had to choose if the mission would have respawn or custom music and that sucks don't it?

please someone give me some help! :'(

Pope_Zog

  • Guest
Re:Respawning
« Reply #10 on: 29 Nov 2002, 11:57:34 »
This is what one of my description.ext files looks like:

Code: [Select]
respawn=3
respawndelay=10

onLoadMission="Control the Continent"

class CfgMusic
{
   tracks[]=
   {
       kaizers_kontroll
   };


   class kaizers_kontroll
   {
       name = "Kontroll paa kontinentet";
       sound[] = {\sound\kaizers.ogg, db+0, 1.0};
   };
};

I've got the file kaizers.ogg in a subdirectory called sound - inside my mission directory. The song shows up in the trigger effects Music popup menu as Kontroll paa kontinentet. Never had any problems with it...

Pope Zog

Commando

  • Guest
Re:Respawning
« Reply #11 on: 29 Nov 2002, 14:45:03 »
I'll try that thanks! :)
You guys are the best.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Respawning
« Reply #12 on: 05 Dec 2002, 00:36:23 »
A couple of more things on respawning players that probably belongs here, seeing as its supposed to be a reference post

____________________________________________________________________
Creating random respawn areas
ie where a soldier respawns in one of X amount of respawn zones

Script as follows
--------------------------------------------------------------------------
Quote
;Respawn.sqs (random respawn)

_player = _this select 0
_numzone = _this select 1
_radius = 50
_respawnzone = "Respawn_West"

;randomly choose a respawn zone:
_num = random(_numzone)

;get integer
_num = _num - (_num mod 1)
-------------------------------------------------------------------------------
Create a marker for each respawn zone you want
Call them (if you want west to have the random respawn location)

respawn_west
respawn_west1
respawn_west2 etc etc
--------------------------------------------------------------------------------
For each soldier you want to respawn in these randon locations, create the following trigger
(As seen in mission.sqm file)

   class Item0
      {
         position[]={8654.632813,9.634197,12625.308594};
         a=0.000000;
         b=0.000000;
         repeating=1;
         age="Actual";
         text="A1_Respawn";
         name="A1_Respawn";
         expCond="!(alive A1)";
         expDesactiv="[A1,6]exec ""respawn.sqs""";
         class Effects
         {
         };
      };
--------------------------------------------------------------------------
Where A1 is the name of the soldier
and  "expDesactiv="[A1,6]"
the 6 denotes the number of respawn zones you created
ie respawn_west to respawn_west5
________________________________________________________________________
_________________________________________________________________________
If you want an extra respawn zone in addition to respawn_west

Quote
; rescue_respawn.sqs
; Script that respawns players in a specific zone.
; Simplified from Backoff's multiple respawn script.
;
; Syntax: [player name, respawn marker name] exec "respawn_rescue.sqs"
;
; "Player name" is the name given to the player.
; "respawn marker name" is the name of the respawn marker the player
; should respawn in.
;
; Example: [Rescue1, "rescuers_area"] exec "respawn_rescue.sqs"
;
_player = _this select 0
_zone = _this select 1
_radius = 10

_pos = getMarkerPos _zone

; Create random number to set the player position
_randx = random (_radius)
? ( random(10) < 5 ): _randx = _randx * -1
_randy = random(_radius)
? ( random(10) < 5 ): _randy = _randy * -1

; Set the position.
_player setpos [(_pos select 0) + _randx, (_pos select 1) + _randy, 0]

Exit
-------------------------------------------------------------------------------------
Create a marker for it, calling it ****_respawn
in the following example this is called "rescue_respawn"
----------------------------------------------------------------------------
and then a trigger for each player that is required to respawn at this other location
In this example player is called "RP5"
------------------------------------------------------------------------------

      class Item19
      {
         position[]={8673.614258,6.824206,12584.245117};
         a=0.000000;
         b=0.000000;
         repeating=1;
         age="UNKNOWN";
         text="RP5 respawn trigger";
         name="RP5_Respawn_";
         expCond="alive RP5";
         expActiv="[RP5, ""rescue_respawn""] exec ""rescue_respawn.sqs""";
         class Effects
         {
         };
      };
   };
};

Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

eye-liquid

  • Guest
Re:Respawning
« Reply #13 on: 16 Dec 2002, 17:38:26 »
thanks for the code but when i respawn i get respanwed to a bird... and at the other numbers i get a bird to so PLZ HELP

eye-liquid

  • Guest
Re:Respawning
« Reply #14 on: 16 Dec 2002, 20:05:00 »
ive got it working now
but i want less than 20 seconds respawning
how can i do that???