Home   Help Search Login Register  

Author Topic: Cutscene Won't End  (Read 463 times)

0 Members and 1 Guest are viewing this topic.

calvinjune

  • Guest
Cutscene Won't End
« on: 09 Sep 2003, 04:29:39 »
At the end of a camera script i destroyed the camera and enabled user input, but i can't control my player. the camera just keeps following the last object targeted.

help??

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Cutscene Won't End
« Reply #1 on: 09 Sep 2003, 09:57:25 »
Hey there, calvinjune

Any chance of giving us a look at the code you're using to end the scene/destroy the camera?

If the camera is continuing to follow an object, I'd say there is a fair chance it isn't getting destroyed properly (some things just won't die when they're told too ;D)

calvinjune

  • Guest
Re:Cutscene Won't End
« Reply #2 on: 09 Sep 2003, 22:20:35 »
the last cam moves go like this:

_camera = "camera" camcreate [10856.87,3125.71,4.74]
_camera cameraeffect ["internal","back"]

_camera camSetTarget a1
_camera camSetPos [10856.87,3125.71,4.74]
_camera camSetFOV 0.700
_camera camCommit 2
@camCommitted _camera
_camera camSetTarget a1
_camera camSetPos [10855.68,3126.00,4.74]
_camera camSetFOV 0.346
_camera camCommit 2
@camCommitted _camera
_camera camSetTarget a1
_camera camSetPos [10855.68,3126.00,4.74]
_camera camSetFOV 0.161
_camera camCommit 2
@camCommitted _camera

camdestroy camera
disableuserinput false
exit


all the cam moves work, cams previous to this last one move around and destroy just fine. this last one just wants to be difficult.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Cutscene Won't End
« Reply #3 on: 10 Sep 2003, 03:41:50 »
Ahh... there we go...

The problem is you're not destroying your camera... you're destroying some other camera ;D

If you look at your camdestroy line, you'll see that it refers to camera. All the other lines (most importantly the camcreate one) refer to _camera. The underscore is very important, as camera and _camera are two completely different objects!

So to destroy your camera, simply change the line to:

camdestroy _camera

However I would also suggest adding a line to terminate your camera, eg:

_camera cameraeffect ["terminate","back"]
camdestroy _camera

OFP used to have issues with destroying cameras before they had been terminated. This may have been fixed in recent patches, but better safe than sorry ;)

Hope that helps you out...