Home   Help Search Login Register  

Author Topic: Camera scripting issues  (Read 1315 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Camera scripting issues
« on: 10 Mar 2009, 07:51:09 »
Hi, why is it, everytime I copy and paste a camera script I've previously used before and has worked perfectly fine then.

Then when I copy and paste it into a new mission and just change the target names, it never works!

Arrgggh..

Here is the script.

Quote
titlecut ["","black in",1]
_cam = "camera" camCreate [0,0,0]
_cam cameraeffect ["Internal", "back"]


;Wait a moment.
~5

;Play Dialogue.
PlayMusic "Scene1"

; point the camera at the player, and place it 2m to the players left,
; 10m to his front and 3m above the ground
_cam camsettarget player
_cam camsetrelpos [1,-10,3]
_cam camcommit 0

~200

; end cutscene
_cam cameraeffect ["terminate", "back"]
camdestroy _cam

; fade back in over 2 seconds
titlecut [" ","BLACK IN",2]

exit


Seems fine, but the view is of the ocean throughout the whole script. How do I make it start at the player?

Or any target for that matter.....

Thanks..
Who's hyped for Arma4, long live Arma!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Camera scripting issues
« Reply #1 on: 10 Mar 2009, 08:14:19 »
It should work if you replace...

  _cam = "camera" camCreate [0,0,0]

...with...

  _cam = "camera" camCreate (getPos player)

try { return true; } finally { return false; }

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Camera scripting issues
« Reply #2 on: 10 Mar 2009, 17:51:49 »
Yeah that didn't work, it's wierd. 

It shows the ocean for like 5-8 seconds then the cutscene starts...

It did that before you gave me the code   :dunno:
Who's hyped for Arma4, long live Arma!

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Camera scripting issues
« Reply #3 on: 21 Mar 2009, 11:02:43 »
Try placing your 5 second delay after you set the relative position of the camera. Your creating it at 0,0,0 grid and then never changing it's position until you set it relative to the player, 5 seconds later.