Home   Help Search Login Register  

Author Topic: dolittle's Revive Respawn  (Read 1618 times)

0 Members and 4 Guests are viewing this topic.

FWB

  • Guest
dolittle's Revive Respawn
« on: 19 Oct 2003, 22:44:24 »
I'm not having any luck with this outside of his demo mission (where it works wonderfully). When I import into into my own mission though it doesn't seem to be working. If you die you do get thrown into the cutscene but that's about it. All I did was copy his scripts into my mission's directory (cam, init, respawn) and then copied his triggers into my game, renaming my players the same name he gives his in the demo. Hence I really at am I lose as to how to get this to work. Any ideas? Ohh, and I'm using is description.ext too, but that doesn't seem to be loading up at all either.

Also, the major trigger you use in this feature, to dictate an ending, does that have to cover the entire playing area?

EDIT: I managed to get it to work (don't ask me how) except that the teleportation doesn't work. The dead player respawns, miles away, as intended, but another player standing over his dead body doesn't cause him to teleport back into battle.
« Last Edit: 20 Oct 2003, 00:51:19 by FWB »

FWB

  • Guest
Re:dolittle's Revive Respawn
« Reply #1 on: 20 Oct 2003, 03:15:15 »
Narrowed it done. The problem seems to be due to the fact that I'm basing my mission on the Invasion mode and hence I'm not using "regular" soldiers. I assume that means certain areas of the scripts need to be changed.

Init
Quote
requiredVersion "1.85"

soldierType = "SoldierWB"

titleCut ["", "BLACK IN", 3]

respawnS1 = 0
respawnS2 = 0
respawnS3 = 0
respawnS4 = 0
respawnS5 = 0
respawnS6 = 0
respawnS7 = 0
respawnS8 = 0

and

Respawn.sqs
Quote
;by Doolittle
_string = _this

_body = call format ["%1", _string]
?_body == player : [] exec "cam.sqs"

~5
_string setMarkerType "Marker"
_string setMarkerPos getPos _body

#notalive
~1
_obj = call format ["%1", _string]
?not alive _obj : goto "notalive"

?not local _body : goto "list"

_respawn = call format ["respawn%1", _string]
_respawn = _respawn + 1
call format ["respawn%1 = _respawn", _string]
?_respawn > param1 : exit

"_obj removeMagazine _x" forEach magazines _obj
"_obj removeWeapon _x" forEach weapons _obj
"_obj addMagazine _x" forEach magazines _body
"_obj addWeapon _x" forEach weapons _body
_obj selectWeapon primaryWeapon _obj

_pos = getPos _body
_pos = [_pos select 0, _pos select 1, 0]
_dir = getDir _body
_dir = _dir - 90

deleteVehicle _body
_body = "Body" createVehicle _pos
_body setDir _dir

_ai = objNull
#nearest
~1
_soldier = nearestObject [_body, soldierType]
?isNull _soldier : goto "nearest"
?not alive _soldier : goto "nearest"
?_ai != _soldier : _ai = _soldier; _ai doMove _pos
?_soldier distance _body > 5 : goto "nearest"

~1
deleteVehicle _body
_obj = call format ["%1", _string]
?not alive _obj : exit

_soldier doWatch _obj
_soldier playMove "MedicToCombat"
_obj switchMove "LyingToCombat"
_obj setPos _pos
_obj setDir _dir

_obj setCaptive true
~5
~3.5
_obj setCaptive false

#list
~1
_obj = call format ["%1", _string]
?not (_obj in list playeralive) : goto "list"

_string setMarkerType "Empty"

Could someone tell me what to change so that the Invasion 44 soldiers can use this script? Merci.

Sorry mods about that wrong placement.
« Last Edit: 20 Oct 2003, 03:21:48 by FWB »

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:dolittle's Revive Respawn
« Reply #2 on: 23 Oct 2003, 20:29:37 »
Man I can't even remember my own script.  Ack.

Try changing soldierType.  The script is written so that only one type of person can revive people....I think.

Doolittle

FWB

  • Guest
Re:dolittle's Revive Respawn
« Reply #3 on: 23 Oct 2003, 21:26:58 »
Man I can't even remember my own script.  Ack.

:) It happens.

Quote
Try changing soldierType.  The script is written so that only one type of person can revive people....I think.

Doolittle

I've tried a number of ideas, even been given a few suggestions by others, but nothing seems to work for multiple players. You were my only hope, dolittle. My only hope. :)

Offline GadZoo

  • Members
  • *
Re:dolittle's Revive Respawn
« Reply #4 on: 28 Dec 2003, 05:24:47 »
We've been using this script forever.  It adds a great new angle to respawn by not automatically finishing a mission due to unlimited respawns.  I communicated with Dolittle having the same problem with multiplayer but with his memory problem  ;) we were stuck.  

I did however find a solution, quite by accident.  First you MUST have the correct soldiers name in the init.sqs.  Once you die and go into "bird" mode you may float around and actually help your teammates.  Pressing the CTRL button next to the arrow keys will give the ability to change directions while in bird mode although you can't exit that mode once pressed.

Second, you must move the "force end" trigger or better yet delete it.  For some reason when it encompasses the playing field I couldn't get the script to work.  By moving it to the edge of the  map that seemed to help.  

Lastly, after you have been killed and someone comes over to your body, you will see yourself respawn from bird mode.   Press the "V" button and you should find yourself back alive and well.  If you press the "V" before you see your body respawn you will spawn over to wherever the respawn marker is and it's a 50-50 chance of respawning back to where you died.

If you all haven't tried this script in mutiplayer you should.  It makes you depend on one another to survive.  If all players get killed, mission over.  So it is imperative to work together to finish a mission.

Maybe we could get Dolittle to look at this once again and using his superior intellect, find a better way to make it work.   ;D