Jump to content

Recommended Posts

Hello guys! I'm trying to script a camera. First of all i called a fuction in editor, so far so good. Then i try to script it. I mean: i want when the player enter in the mission (so i do a file called "intro.sqs") the camera starts to follow the path after the player select the respawn. But the camera don't start. This is the code for intro.sqs

playsound "pula";
showcinemaborder true;
_cam = "Camera" camcreate [102027.29,14225.88,17913.21]
_cam camsettarget [102027.29,14225.88,17913.21]
_cam cameraeffect ["INTERNAL","BACK"]

titlecut ["","black out",1]
126 cutRsc ["we","PLAIN",0]
~1

TitleRsc ["intro1","plain",1]
;;TitleRsc ["intro2","plain",1]
titlecut ["","black in",3]
;1 is the fastest speed of fade in of text
;use 10 to make fading in very slow
_cam camsettarget [89576.03,14084.74,-51125.26]
_cam camsetrelpos [-10,-111,20]
_cam camcommit 0
camcommitted _cam
~10

TitleRsc ["intro2","plain",1]
_cam camsettarget [89576.03,14084.74,-51125.26]
_cam camsetrelpos [-10,-111,30]
_cam camcommit 33
camcommitted _cam


titleText ["intro3","plain",1]
_cam camsettarget [96431.42,14162.46,-37244.72]
_cam camsetrelpos [-10, -111, 30]
_cam camcommit 0
camcommitted _cam

~5
;wait 10 seconds for the transition,the camera will stop @ 7 and stay for 3 seconds
;then exits
_cam cameraeffect ["TERMINATE","BACK"]
camdestroy _cam
125 cutRsc ["fake","PLAIN",0];
126 cutRsc ["fake","PLAIN",0];

Share this post


Link to post
Share on other sites

It looks like you need to switch the player's view to the camera. Try switchCamera.

_cam switchCamera "Internal";

Might work. To be honest I don't know that much about cameras, but I have to learn soon for something I'm working on.

Share this post


Link to post
Share on other sites

Are you trying to make something cinematic? if so, here is what it should look like.

http://pastebin.com/3kTdW9ww

It has a lot of AI scripting but everything you need camera wise is in there.

 

Hope it helps.
 

Share this post


Link to post
Share on other sites

It looks like you need to switch the player's view to the camera. Try switchCamera.

_cam switchCamera "Internal";

Might work. To be honest I don't know that much about cameras, but I have to learn soon for something I'm working on.

 

 

I think i already did it with _cam cameraeffect "Internal", maybe i wrong 

 

Are you trying to make something cinematic? if so, here is what it should look like.

http://pastebin.com/3kTdW9ww

It has a lot of AI scripting but everything you need camera wise is in there.

 

Hope it helps.

 

 

It's not like a really cinematic but we can call it like that. Now the camera work but when it change position it's like bugged. I can see just blue like a sea with texture of dirt. I don't know why. Thank's for help guys!

Share this post


Link to post
Share on other sites

here is my intro.sqs  (with cam).

http://pastebin.com/QDFc7RjX

 

 

basically this cam goes to/from 1 destination to were players/ai spawned at ...

I have no errors and its always worked. since ofp 2003.

just had to change {} to ""

credits to eRazor

Share this post


Link to post
Share on other sites

Make sure you have you XYZ coordinates set correctly.

Post your updated code if you like.

Share this post


Link to post
Share on other sites

Make sure you have you XYZ coordinates set correctly.

Post your updated code if you like.

 

No thanks man, i solved it. Thank you very much!

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×