Home   Help Search Login Register  

Author Topic: Respawning Script  (Read 639 times)

0 Members and 1 Guest are viewing this topic.

Chris330

  • Guest
Respawning Script
« on: 30 Aug 2004, 04:14:13 »
Dear All,
I have recently decided to return to the ofp scene and I am trying to understand the respawn scripts and thus make a basic one of my own for use in my own missions. I have tried everything but I find that whatever I do, even when using the killed eventhandler to run a script which sets the player's damage back to zero, the game still insists on exiting.

I would be very interested to know how the respawn scripts that work prevent the game from exiting when the player dies. Is there some command or something which bars the game from being able to exit prematurely? Any help would be brilliant ;)

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:Respawning Script
« Reply #1 on: 30 Aug 2004, 10:20:16 »
I'm no expert but I think the description.ext is quite important in this. In the description.ext you must have the lines respawn= and respawndelay=. Make respawn delay equal the length of time before death and respawning and respawn equal the method of respawning. Methods are as follows:

Bird - become a seagull
Instant - reappear where you died
Base - respawn at the approapriate maker "respawn_west" for NATO "respawn_east" for Soviets
Group - Become another guy in your squad
Side - Like group but not limited to your squad
None - None at all

This only works in multiplayer I think. You could still play a mission in multiplayer with just one guy as playable and it would be the same as in single player.

Chris330

  • Guest
Re:Respawning Script
« Reply #2 on: 30 Aug 2004, 17:07:03 »
That's very interesting!! I'll have a look at that and start playing around with it. If you or anyone else can think of a complete solution please let me know. Thankyou kindly for your reply :D

Chris330

  • Guest
Re:Respawning Script
« Reply #3 on: 31 Aug 2004, 02:39:56 »
I thought I'd update. I managed to get my script to run okay in a multiplayer game. There is one problem though. I instruct the game to creat a parachute at the respawn point just after the player has died.

Then I instruct it to move the player into the parachute as a driver, which it duly does. Hey presto I appear at the respawn point ready to go. With one problem though. After a few seconds I am warped to the point where I originally died and where I was standing moments previously a new unit has been created.

Can anyone think why this is? Also could someone shed some light on exactly what is supposed to be in the description and init files to allow normal respawning? I would be most grateful ;)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning Script
« Reply #4 on: 31 Aug 2004, 03:20:38 »
I know a little about a lot, and a lot about a little.

Chris330

  • Guest
Re:Respawning Script
« Reply #5 on: 31 Aug 2004, 08:33:53 »
Great Job Planck!!! Thanks a bundle. I'll hack through that thread and post up my conclusions/understanding of it. Thanks mate :D