OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 30 Apr 2003, 19:58:20
-
this is the name of a script but I post it here cause I think its related to camscripting.
I want a simple slomotion cutscene when the player get killed, but the prob is that the mission never ends...
Here is the code
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal","back"]
setacctime 0.2
_camera camsettarget player
_camera Camsetrelpos [-2,0,2]
_camera camcommit 0
@Camcommitted _camera
~3
setacctime 1
_camera cameraeffect ["terminate","back"]
Camdestroy _camera
end = true
exit
Ive got 1 trigger ,delay 3 sec:
condition : end
type : end#1
The cutscene works and the camera's destroyed but I return to the dead player, I can move my mouse around but no debriefing... I have to close OFP everytime cause I can't press Esc or other keys anymore... Very frustrating...
It looks like I've used the disableuserinput true command but I did not...
Please help me with this or give me an example where onplayerkilled.sqs is used...I'm not too lazy to find it out, but I need a push...
THX Blanco
-
The official onplayerkilled script doesn't end. Play an official mission and you'll see what I mean ... it just goes on till you select retry or end.
So don't end the script. There is no debriefing after death. If you want one, I suggest you use a variable in the script to fire a trigger which ends the mission as if you were not dead.
-
Euhem, I don't get it...
I 've used a variable end = true which fire an end typetrigger,(with conditon : end) but the mission dont end!
I tried it without the camdestroy _camera & _camera cameraeffect ["terminate","back"] line
I can wait forever, the end & retry buttons will never show up. I have to close OFP & restart it, It's drivin' me nuts! :gunman:
What is the use of "onplayedkilled.sqs" as it never ends? ???
I checked every official campaign mission, BIS never used the script...
:help:
-
BIS use it in every mission, it loads automatically unless you have a file of that name in the mission folder.
Hang on, I'll go and find it ....
Codemasters\OFP\DTA\scripts.pbo
unpbo that file and have a look.
-
But hey, isnÂ't there also another script after the onplayerkilled? I have unpboed the BTL campaign, and some of you remember that there was a custom death scene, where was the cross.
It seems that the onplayerkilled determines what happens when player dies and then this deadcam.sqs activates and makes that scene with retry and abort buttons.
-
at the end of your script type the line, "enableEndDialog" and the retry/load/quit buttons will appear. Don't bother terminating the camera.
Like so...
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal","back"]
setacctime 0.2
_camera camsettarget player
_camera Camsetrelpos [-2,0,2]
_camera camcommit 0
@Camcommitted _camera
~3
setacctime 1
enableEndDialog
-
Thank you all for the help, guys
EnableEnddialog... euhm Sounds good & logical!
I will try it tonight, but I'm sure it will work...any I will be back to push that solved button...