OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Knut Erik on 19 Mar 2003, 12:53:59
-
I have a problem... When I uses a camera at the end of the mission (you know. A camera that views the battlefield or something), the end command doesn't seem to work. In a script forexsample.
_camera = "camera" camcreate [0,0,0]
_camera setcameffect ["internal","back"]
_camera setcamrelpos [2,2,2]
_camera camsettarget aP
_camer camcommit 0
endmission=true
Something like that. (Don't know if the commands are right up there, but it is in my end.)
Then I creates a trigger that have the condicion endmission
And on activation #end1
When the camera shows up, the mission never ends!!
Is there a way to fix this?
-
It should work.
Taken from the Tutorial mission in the Ed Depot......
--------------------------------------
~8
"2" Objstatus "DONE"
titlecut [" ","BLACK IN",3]
enableradio false
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
_cam camSetTarget [-45132.40,90394.12,-26215.94]
_cam camSetPos [1396.24,5877.19,22.72]
_cam camSetFOV 0.700
_cam camCommit 0
@camCommitted _cam
titlecut ["Mission accomplished", "plain", 3]
_cam camSetTarget [-92413.16,-16657.67,-26215.85]
_cam camSetPos [1396.24,5877.19,22.72]
_cam camSetFOV 0.700
_cam camCommit 9
@camCommitted _cam
~3
titlecut ["","BLACK OUT",2]
~2
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
; this variable fires the trigger which actually ends the mission
end=true
exit
---------------
And then of course a trigger
type: End#1
condition: end
-
:hmm: Hmm :hmm:
I'll test more when I gets home...
:hmm: :hmm:
Veeeery strange
:hmm: :hmm:
-
_camera = "camera" camcreate [0,0,0]
_camera setcameffect ["internal","back"]
_camera camcommit 0
_camera camsettarget aP
_camera setcamrelpos [2,2,2]
_camera camcommit 0
endmission=true
I think that is it...
And you have to kill th camera for the other Q.
-
Here is how I did it.... And it worked.
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal","back"]
_camera camSetTarget [90161.66,-32587.21,-48060.46]
_camera camSetPos [9329.15,1087.39,49.86]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
_camera camSetTarget [27943.16,-84475.77,-48059.82]
_camera camSetPos [9329.15,1087.39,49.86]
_camera camSetFOV 0.700
_camera camCommit 10
@camCommitted _camera
~2
titleText ["Mission complete.", "Plain"]
titlecut ["","black out",5]
~5
"3" objstatus "done"
~1
_camera cameraeffect ["terminate","back"]
aP addRating 500
TotalEnd=true
Thanks a lot for the help.
8) Deå! 8)