Home   Help Search Login Register  

Author Topic: revive respawn with spectator script  (Read 1564 times)

0 Members and 1 Guest are viewing this topic.

TERA_Forrest

  • Guest
revive respawn with spectator script
« on: 24 Nov 2005, 21:12:42 »
can somone plz give me a link to this script, i can't seem to find it anywhere.

I got a hold of doolittle's revive respawn and then found the spectator script but i cannot find a way to make them work together.

thanks in advance.

TERA_Forrest

  • Guest
Re:revive respawn with spectator script
« Reply #1 on: 24 Nov 2005, 21:18:01 »
here is what i did with the "cam.sqs" file...

Code: [Select]
;by Doolittle
DeathCamArray = [s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12]





_seagull = _this select 2
_seagull setpos[0,0,0]

DeathCamCurCamTarget = "HeliHEmpty" CreateVehicle getpos player

&1.5
titleCut ["","BLACK OUT", 1.5]
&3
titleCut ["","BLACK IN", 4]

DeathCamCineViewSpecial = 0
DeathCamComSpeed = 0.4
DeathCamRelPos = [0,-2,0.3]
DeathCamTarHeight = 1.7
DeathCamIndex = 0

DeathCamCurTarget = player
DeathCam = "camera" camCreate [(getpos player select 0)+2, (getpos player select 1)+2, 700 ]
DeathCam cameraEffect ["internal","front"]
DeathCam camSetTarget vehicle DeathCamCurCamTarget
DeathCam camSetPos [(getpos player select 0)+2, (getpos player select 1)+2, 1000 ]
DeathCam camSetFOV 0.976
DeathCam camCommand "inertia on"
DeathCam camCommit 0
showCinemaBorder false
_ok = createDialog "DlgSpectateDeath"
ctrlShow [1046001,false];ctrlShow [1046002,false];ctrlShow [1046003,false];ctrlShow [1046004,false];ctrlShow [1046005,false];ctrlShow [1046006,false];ctrlShow [1046007,false];ctrlShow [1046008,true];ctrlShow [1046009,false]
ctrlSetText [116969,name player]

? not _ok : exit

#loop

[b];;;;;;;;;;;;added
@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
;;;;;;;;;;;;;;[/b]
DeathCam camCommit DeathCamComSpeed
_vhlTemp = vehicle DeathCamCurTarget

; Cinematic view?
? DeathCamCineViewSpecial == 1 : goto "camspecial"




; The following will reduce the effect of warping spectated object to the camera itself

_Divider = 100 - (speed _vhlTemp * 2)
? _Divider < 10 : _Divider = 10
_moX = (getpos DeathCamCurCamTarget select 0) + (((getpos _vhlTemp select 0) - (getpos DeathCamCurCamTarget select 0))/_Divider)
_moY = (getpos DeathCamCurCamTarget select 1) + (((getpos _vhlTemp select 1) - (getpos DeathCamCurCamTarget select 1))/_Divider)
_moZ = ((getpos DeathCamCurCamTarget select 2)-DeathCamTarHeight) + (((getpos _vhlTemp select 2) - ((getpos DeathCamCurCamTarget select 2)-DeathCamTarHeight))/_Divider)

DeathCamCurCamTarget setpos[_moX,_moY,_moZ  + DeathCamTarHeight]

DeathCamCurCamTarget setdir getdir _vhlTemp

; Top view?
? DeathCamCineViewSpecial == 2 : goto "camspecialTop"


_RealRelPos = DeathCamRelPos
? ((speed vehicle DeathCamCurTarget >= 150)) : _RealRelPos = [(DeathCamRelPos select 0)*10, (DeathCamRelPos select 1)*10, (DeathCamRelPos select 2)*10]

DeathCam camSetRelPos _RealRelPos


goto "loop"


; Cinematic view
#camspecial
DeathCamCurCamTarget setpos[getpos _vhlTemp select 0,getpos _vhlTemp select 1,(getpos _vhlTemp select 2) + DeathCamTarHeight]
DeathCamCurCamTarget setdir getdir _vhlTemp

; Reset cam if object is far away... if its a very fast object use a more distant view
? ((speed vehicle DeathCamCurTarget >= 150)) and (((DeathCam) distance (DeathCamCurCamTarget)) > 400) : DeathCam camSetRelPos [3,400.1,10.0]
? ((speed vehicle DeathCamCurTarget < 150)) and (((DeathCam) distance (DeathCamCurCamTarget)) > 100) : DeathCam camSetRelPos DeathCamRelPos

goto "loop"

; Top view
#camspecialTop
DeathCamCurCamTarget setdir 0
DeathCam camSetPos [getpos DeathCamCurCamTarget select 0,getpos DeathCamCurCamTarget select 1,(getpos DeathCamCurCamTarget select 2)+(20 + (speed vehicle DeathCamCurTarget / 2))]

goto "loop"

this is the original "cam.sqs" file from the revive script...

Code: [Select]
;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

here is the "playerasseagal.sqs" file from the spectator script....

Code: [Select]
;
; Spectating script v1.0 by Kegetys <Kegetys@raketti.net>
; http://www.ofp.kege.cjb.net
;
; Requires OFP Version 1.75 or up
;


;
; Change DeathCamArray values to spectateable objects
; Remember to use driver/gunner if you want to spectate the player driving/gunning the vehicle if he exits it
;


DeathCamArray = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16]





_seagull = _this select 2
_seagull setpos[0,0,0]

DeathCamCurCamTarget = "HeliHEmpty" CreateVehicle getpos player

&1.5
titleCut ["","BLACK OUT", 1.5]
&3
titleCut ["","BLACK IN", 4]

DeathCamCineViewSpecial = 0
DeathCamComSpeed = 0.4
DeathCamRelPos = [0,-2,0.3]
DeathCamTarHeight = 1.7
DeathCamIndex = 0

DeathCamCurTarget = player
DeathCam = "camera" camCreate [(getpos player select 0)+2, (getpos player select 1)+2, 700 ]
DeathCam cameraEffect ["internal","front"]
DeathCam camSetTarget vehicle DeathCamCurCamTarget
DeathCam camSetPos [(getpos player select 0)+2, (getpos player select 1)+2, 1000 ]
DeathCam camSetFOV 0.976
DeathCam camCommand "inertia on"
DeathCam camCommit 0
showCinemaBorder false
_ok = createDialog "DlgSpectateDeath"
ctrlShow [1046001,false];ctrlShow [1046002,false];ctrlShow [1046003,false];ctrlShow [1046004,false];ctrlShow [1046005,false];ctrlShow [1046006,false];ctrlShow [1046007,false];ctrlShow [1046008,true];ctrlShow [1046009,false]
ctrlSetText [116969,name player]

? not _ok : exit

#loop

DeathCam camCommit DeathCamComSpeed
_vhlTemp = vehicle DeathCamCurTarget

; Cinematic view?
? DeathCamCineViewSpecial == 1 : goto "camspecial"




; The following will reduce the effect of warping spectated object to the camera itself

_Divider = 100 - (speed _vhlTemp * 2)
? _Divider < 10 : _Divider = 10
_moX = (getpos DeathCamCurCamTarget select 0) + (((getpos _vhlTemp select 0) - (getpos DeathCamCurCamTarget select 0))/_Divider)
_moY = (getpos DeathCamCurCamTarget select 1) + (((getpos _vhlTemp select 1) - (getpos DeathCamCurCamTarget select 1))/_Divider)
_moZ = ((getpos DeathCamCurCamTarget select 2)-DeathCamTarHeight) + (((getpos _vhlTemp select 2) - ((getpos DeathCamCurCamTarget select 2)-DeathCamTarHeight))/_Divider)

DeathCamCurCamTarget setpos[_moX,_moY,_moZ  + DeathCamTarHeight]

DeathCamCurCamTarget setdir getdir _vhlTemp

; Top view?
? DeathCamCineViewSpecial == 2 : goto "camspecialTop"


_RealRelPos = DeathCamRelPos
? ((speed vehicle DeathCamCurTarget >= 150)) : _RealRelPos = [(DeathCamRelPos select 0)*10, (DeathCamRelPos select 1)*10, (DeathCamRelPos select 2)*10]

DeathCam camSetRelPos _RealRelPos


goto "loop"


; Cinematic view
#camspecial
DeathCamCurCamTarget setpos[getpos _vhlTemp select 0,getpos _vhlTemp select 1,(getpos _vhlTemp select 2) + DeathCamTarHeight]
DeathCamCurCamTarget setdir getdir _vhlTemp

; Reset cam if object is far away... if its a very fast object use a more distant view
? ((speed vehicle DeathCamCurTarget >= 150)) and (((DeathCam) distance (DeathCamCurCamTarget)) > 400) : DeathCam camSetRelPos [3,400.1,10.0]
? ((speed vehicle DeathCamCurTarget < 150)) and (((DeathCam) distance (DeathCamCurCamTarget)) > 100) : DeathCam camSetRelPos DeathCamRelPos

goto "loop"

; Top view
#camspecialTop
DeathCamCurCamTarget setdir 0
DeathCam camSetPos [getpos DeathCamCurCamTarget select 0,getpos DeathCamCurCamTarget select 1,(getpos DeathCamCurCamTarget select 2)+(20 + (speed vehicle DeathCamCurTarget / 2))]

goto "loop"

TERA_Forrest

  • Guest
Re:revive respawn with spectator script
« Reply #2 on: 24 Nov 2005, 21:28:31 »
ok, google search produced the answer and gave me somthing better than the revive respawn 1.0 located in ofpec.com's script section... here's the link if anyone is interested...

http://members.iinet.net.au/~nrspence/P5.html