Home   Help Search Login Register  

Author Topic: Problems with cutscene again...  (Read 2094 times)

0 Members and 1 Guest are viewing this topic.

Offline Rytuklis

  • Members
  • *
Problems with cutscene again...
« on: 27 Dec 2010, 18:21:29 »
Here is what i do:

_camera = "camera" camCreate [0 , 0, 0]
_camera cameraEffect ["internal","back"]

;=== 0:00:03
_camera camSetTarget Civilian1
_camera camSetPos [11102.43,1261.10,0.75]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera


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

But camera spawns at random location and shows me random location at the map... I dont know what to do... Also how do i find the coordinates where do i need to set the camera??

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: I have a problem
« Reply #1 on: 27 Dec 2010, 18:40:16 »
That was an example, do not place it. You have to do the above steps the other was an example of how he had to stay.
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: I have a problem
« Reply #2 on: 27 Dec 2010, 23:08:21 »
Use descriptive topic titles, please. Also, place multiple lines of code inside of UBB code tags (use the # symbol in the toolbar above the smileys).

You mentioned in the other thread that

Quote
i dont understand coding, i am looking for easier solutions

Somehow, you can make camera cutscenes using triggers, but I never bothered to learn how. I think most OFP mission makers use scripting for cutscenes, and that's why the tutorials are written with scripting in mind.

Coding is not as difficult as you might think. There are a ton of tutorials. This is the one I learned from:

http://www.armaholic.com/page.php?id=92

Anyway, I'll try to explain what's gone wrong with your script.

Quote
But camera spawns at random location and shows me random location at the map

What's probably happening is that it the camera spawns at location [0,0,0], which is at the southwest corner of the map, in the water. That's because of this line:

Code: [Select]
_camera = "camera" camCreate [0, 0, 0]

You have to enter the correct co-ordinates inside of the brackets so that the game knows where to create the camera. To get correct co-ordinates, use camera.sqs or use scripting commands such as getPos. Example:

Code: [Select]
_camera = "camera" camCreate getpos player

After being spawned at [0,0,0], the camera will want to move to [11102.43,1261.10,0.75], because of this:

Code: [Select]
;=== 0:00:03
_camera camSetTarget Civilian1
_camera camSetPos [11102.43,1261.10,0.75]
_camera camSetFOV 0.700
_camera camCommit 0

Once again, the correct co-ordinates must be entered into the brackets after camSetPos. Actually, camSetRelPos is usually better than camSetPos, which is bugged.

I'm surprised that the following code did not cause the camera to be terminated instantly:

Code: [Select]
_camera camCommit 0
@camCommitted _camera

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

The number after camCommit is the number of seconds that the camera will take to move to new coordinates.

Enter the correct values into your code, and then see if it works.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: I have a problem
« Reply #3 on: 28 Dec 2010, 02:16:41 »
I'm locking this topic. To discuss it further, feel free to post in the thread started before it entitled "Need help with cutscenes". It contains the proper title that other forum searchers can use. Thank you.

Offline Rytuklis

  • Members
  • *
Problems with cutscene again...
« Reply #4 on: 02 May 2011, 11:04:39 »
I remember i asked question about cutscenes, yes, i found that topic but i do everything what the guy answered in the topic but camera wont work. I create Camera.SQS at "Users/Rytuklis/Saved/Missions/Strength of Unity" but when i go edit the "man1" and do in intialization "this exec "Camera.SQS" i go in preview and nothing happens? Help please!

Walter_E_Kurtz

  • Guest
Re: Problems with cutscene again...
« Reply #5 on: 02 May 2011, 11:28:49 »
Unlocked, merged, retitled

I suspect it's that you are using a path to the savegame folder: "Users/Rytuklis/Saved/Missions/Strength of Unity". This will contain files with names like autosave.fps and weapons.cfg.

You want just "Users/Rytuklis/Missions/" for missions that are being edited. In their folders they will contain mission.sqm and, if you have created them, description.ext, briefing.html, overview.html plus any other scripts.

Offline Rytuklis

  • Members
  • *
Re: Problems with cutscene again...
« Reply #6 on: 02 May 2011, 12:22:44 »
Thank you so much :) I'm gong to try and i will let you know does this works or no

EDIT: Problem  >:('

Now my camera spawns near legs of the characeter. I remember there used to be a way to set the position you want like that: You go to prievew and focus the crosshair into the character you want and then press SPACE and CTRL+C and CTRL+V into the code? How? I forgot
« Last Edit: 02 May 2011, 12:43:09 by Rytuklis »

Offline OFP_f3d3

  • Former Staff
  • ****
  • Fraud is the ready minister of injustice.
Re: Problems with cutscene again...
« Reply #7 on: 02 May 2011, 20:47:14 »
you have to point the crosshair wherever you want and then press CONTROL, then go to the notes and you press CONTROL+V to paste the camera pos. if you want to target a special soldier or thing, the only thing you have to do is to change this line:

Code: [Select]
_camera camSetTarget [X, Y, Z]
to

Code: [Select]
_camera camSetTarget unitname.
BUT if you want the camera to follow the special unit every where he goes you have to write down this

Code: [Select]
#loop

? (ANY CONDITION YOU WANT for example) NOT (alive dumb)  : goto "nextcamera"
 
_camera camSetTarget the-unit-you-want-to-chase
_camera camSetRelPos [X, Y, Z]
_camera camCommit 0
@camcommitted _camera

goto "loop"


That code will do everything easier, if you ahve any other doubt, just ask  ;)

Cheers OFP_f3d3
Nothing in the world is as certain as death.