Home   Help Search Login Register  

Author Topic: Return to mission after cutscene  (Read 435 times)

0 Members and 1 Guest are viewing this topic.

Maclav

  • Guest
Return to mission after cutscene
« on: 17 Apr 2004, 21:27:09 »
How to return to the mission after a cutscene??

i exec this script:


player removeaction 0

_cam = "camera" camcreate [(getpos player select 0)+1,(getpos player select 1)+1,2]
_cam camCommand "inertia off"
_cam cameraEffect ["internal","back"]
_cam camcommit 0

showcinemaborder true
disableuserinput true

_cam camsettarget player
_cam camsetrelpos [5,3,2]
_cam camsetfov 1
_cam camcommit 7

~9

player playmove "EffectStandTalk"
titletext ["To jak z tymi broniami?","plain down",2]
player dowatch man

_cam camsettarget man
_cam camcommit 2

~4

man playmove "EffectStandTalk"
titletext ["Wybierz sobie jedną z tych. \n Cena wliczona w wynagrodzenie","plain down",2]
man dowatch player

~5

player switchmove ""
man switchmove "stand"
disableuserinput false
showcinemaborder false

destroycamera _camera

exit


everything works allright, but after the dialogs I cannot control my unit.
I tried to insert the camera from original scripts.sqs:

_ppos = getPos _this
_px=_ppos select 0
_pz=_ppos select 1
_camera = "camera" camCreate [_px+1, _pz+1, 2 ]
_camera camCommand "manual on"
_camera camCommand "inertia off"
_camera cameraEffect ["internal","back"]
; wait until destroy is forced or camera auto-destroyed
@cheat0 || _camera!=_camera
aP cameraEffect ["terminate","back"]
camDestroy _camera


But OFP shows me the sea and tells that it doeasnt know what is a _this

Plz help!!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Return to mission after cutscene
« Reply #1 on: 17 Apr 2004, 21:42:52 »
There is no destroycamera command, the correct command is:

camDestroy


Planck
I know a little about a lot, and a lot about a little.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Return to mission after cutscene
« Reply #2 on: 18 Apr 2004, 03:27:19 »
End the camera script with these lines:

cameraEffect ["terminate","back"]
camDestroy _camera

The _this is only recognized if the script is called like so:

this exec "script.sqs"

or

unit exec :script.sqs"

if it is called using an array of elements:

[unit1, unit2] exec "script.sqs"

then you would need

_a = _this select 0
_b = _this select 1

at the start of the script.

Maclav

  • Guest
Re:Return to mission after cutscene
« Reply #3 on: 18 Apr 2004, 21:18:18 »
thx a lot i`ll try.....

Maclav

  • Guest
Re:Return to mission after cutscene
« Reply #4 on: 18 Apr 2004, 21:21:59 »
ok... everything`s alright. Thanx again!