Home   Help Search Login Register  

Author Topic: Single Mission Respawn  (Read 3400 times)

0 Members and 1 Guest are viewing this topic.

Offline Viking

  • Members
  • *
  • NORSOF
Single Mission Respawn
« on: 25 Aug 2002, 00:03:03 »
Is it possible to respawn units in Single Missions? If so, can someone tell me how?
VIKING
Modeller/Skinner/Coder
NORFOR

danbryant4

  • Guest
Re:Single Mission Respawn
« Reply #1 on: 25 Aug 2002, 04:57:34 »
I believe that it is not possible. I know if would have to be done via a script, but I think there was some problem with it still ending, b/c even if it checks every 0.0000000000000001 seconds, he is still dead long enough for it to end.

Daniel J Bryant

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Single Mission Respawn
« Reply #2 on: 25 Aug 2002, 05:33:38 »
hmm its pretty much impossible

tai mai shu

  • Guest
Re:Single Mission Respawn
« Reply #3 on: 25 Aug 2002, 10:13:44 »
erm, the deathscenescriptthingy.sqs is what makes it impossible to keep playing or respawn, but what if you made your own deathscene.sqs and put it ingame, and had it activate when a trigger detects if your player is dead.

if you rename the script to match the name fo the official deathscene script, it will override it, and thus you wont die???

Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #4 on: 25 Aug 2002, 13:30:50 »
I was just looking for a script to respawn enemy soldiers if they are killed. (handy in a mission with alot of units)
VIKING
Modeller/Skinner/Coder
NORFOR

CrashnBurn

  • Guest
Re:Single Mission Respawn
« Reply #5 on: 25 Aug 2002, 14:07:34 »
What you want are the createsquad scripts over at -

http://www.backoff.ch/ofp/


Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #6 on: 25 Aug 2002, 15:45:49 »
Thanks! How about someone made a sample mission? One that people get respawned if killed? Possible?
VIKING
Modeller/Skinner/Coder
NORFOR

Offline Gastovski

  • Members
  • *
  • #loop; Gastovski setdammage 0; ~0.01; goto "loop";
    • Falklands Mod
Re:Single Mission Respawn
« Reply #7 on: 25 Aug 2002, 23:16:59 »
Just make a script called "onplayerkilled.sqs" and put in it:

Code: [Select]
_player = ap
_respawn = gamelogic
~1
titletext ["You were killed","PLAIN",1]
_player setpos _respawn
_player setdammage 0
exit

I think that it should work...

Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #8 on: 26 Aug 2002, 16:12:24 »
Gastovski!

Could you explain that abit better, please. And in case you misunderstood, I am looking for a script that makes the enemy respawn when killed, so that there are always enemy soldiers coming at u. (Good for BHD missions)! :)
VIKING
Modeller/Skinner/Coder
NORFOR

CrashnBurn

  • Guest
Re:Single Mission Respawn
« Reply #9 on: 26 Aug 2002, 23:44:48 »
Download the createsquad scripts like I mentioned in my earlier post. Spend some time learning how to use them. There's a sample mission included with the scripts.

For checking how many units are left in a group and spawning more to join the fight you could use a small script like this:

;---------------------------------------------
#loop
? NOT(alive player) : exit
?(("Alive _x" count units groupname) <= 3): [] exec "spawn.sqs"; exit
~5
goto "loop"
;--------------------------------------------

« Last Edit: 27 Aug 2002, 12:58:06 by CrashnBurn »

Offline Gastovski

  • Members
  • *
  • #loop; Gastovski setdammage 0; ~0.01; goto "loop";
    • Falklands Mod
Re:Single Mission Respawn
« Reply #10 on: 27 Aug 2002, 00:20:56 »
Hehe I thought you wanted a respawn for the player...

I will explain though...

"_player = ap" - Assigns the variable _player as ap (players name
"_respawn = gamelogic" - Assigns the var _respawn as gamelogic (The position that you want the player/unit to respawn)
"~1" - Wait approximately 1 second
"titletext ["You were killed","PLAIN",1]" - Print 'You were killed' on the screen
"_player setpos _respawn" - Move _player to _respawn
"_player setdammage 0" - Make it so _player is not damaged in any way
"exit" - Exit the script

And the code said above should work too...  ;D

Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #11 on: 27 Aug 2002, 09:16:04 »
Thanks
VIKING
Modeller/Skinner/Coder
NORFOR

Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #12 on: 27 Aug 2002, 09:18:17 »
How do you suggest using it? Instead of having to make a script for every D*** enemy unit in the mission. Please!
VIKING
Modeller/Skinner/Coder
NORFOR

CrashnBurn

  • Guest
Re:Single Mission Respawn
« Reply #13 on: 27 Aug 2002, 13:02:01 »
The script I wrote will check 1 enemy group. If you have 4 groups, of lets say 9 soldiers, you need to copy the script 4 times and put the proper groupnames in each one. Using the createsquad scripts, you can spawn a new group into the battle as each of the first groups take high casualties.

Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #14 on: 27 Aug 2002, 14:37:09 »
Does this work repeatedly? Like if one group takes high casualties, then aother group gets spawned, and if they get high casualties, ANOTHER group gets spawned, etc.
Does it work like that? Do you have infinite enemies?
VIKING
Modeller/Skinner/Coder
NORFOR

Offline Viking

  • Members
  • *
  • NORSOF
Re:Single Mission Respawn
« Reply #15 on: 27 Aug 2002, 14:42:34 »
CrashnBurn! Could oyu post that script again, but only with a groupname in it(say Foxtrot)? And also please answer the question above.
VIKING
Modeller/Skinner/Coder
NORFOR

CrashnBurn

  • Guest
Re:Single Mission Respawn
« Reply #16 on: 27 Aug 2002, 15:24:57 »
I'll make you a sample mission, but it's gonna take me a little while. Check back later this afternoon. It's 5:30 AM my time now.

CrashnBurn

  • Guest
Re:Single Mission Respawn
« Reply #17 on: 28 Aug 2002, 16:15:36 »


[attachment deleted by admin]
« Last Edit: 28 Aug 2002, 17:54:58 by CrashnBurn »