tophe 69 Posted February 21, 2007 I used to have DoLittles revive respawn script in my COOP-missions in ofp. It turns players in to dead bodies under blankets when they die. Then one of their buddies has to come revive them. Awsome for teamplay. You just has to stick together. I am trying to get it to work an ArmA. But my knowledge in scripting is somewhat limited. Could someone help me out? Every soldier has a trigger that goes "S1" exec "respawn.sqs" when the player (S1) dies. Also there is a marker for each soldier that is supposed to move to where he died. But when the script runs I get tons of errors. If someone has a quick eye for this.. Coul you just look through these two scripts? The first - "respawn.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;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" And the second - "cam.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;by Doolittle enableRadio false _camera = "CAMERA" camCreate getPos player _camera cameraEffect ["Internal", "BACK"] cutText ["", "BLACK IN"] _body = player _camera camSetTarget _body _camera camSetRelPos [0.20, 0.39, 1.86] _camera camSetFov 0.143 _camera camCommit 0 @camCommitted _camera _camera camSetRelPos [2.71, 19.55, 12.94] _camera camSetFov 0.7 _camera camCommit 5 @camCommitted _camera cutText ["You are ""almost dead"" and waiting to be revived", "PLAIN DOWN"] @alive player ~1 _camera camCommit 0 _camera camCommand "manual on" @camCommitted _camera #list ~1 ?not (player in list playeralive) : goto "list" enableRadio true _pos = getPos player _pos = [_pos select 0, _pos select 1, 1] _camera camSetTarget _pos _camera camSetRelPos [10.49, 0.61, 3.48] _camera camSetFov 0.7 _camera camCommit 5 _camera camCommand "manual off" @camCommitted _camera _camera camSetRelPos [-0.82, -3.12, 3.38] _camera camSetFov 0.044 _camera camCommit 3.5 @camCommitted _camera player switchCamera "INTERNAL" player cameraEffect ["Terminate", "BACK"] camDestroy _camera Is there something fundamental that has changed since OFP? I'd really be so happy if someone could help me out. thx. Tophe, Östgöta Ops Share this post Link to post Share on other sites
tophe 69 Posted February 21, 2007 Never mind I found this: http://forums.ogn.com.au/showthread.php?t=45782 Share this post Link to post Share on other sites