Home   Help Search Login Register  

Author Topic: Cam settarget #2  (Read 685 times)

0 Members and 1 Guest are viewing this topic.

Kilo11

  • Guest
Cam settarget #2
« on: 16 Aug 2005, 21:07:46 »
Hey, I know that someone jsut started a topic like this but it owuldnt let me respond to it, so I had to create a new topic, sorry :-(

Anyways..I am having the same problem:

Im making a cutscene and I want the camera to follow a unit IN a boat WHILE its moving.  I tried using the presnted code:

Code: [Select]
#loop

_camera camsettarget getPos LeaderWGroup
_camera camcommit 0
@camcommitted _camera

~0.01

?not stop_following : goto "loop"

Along with this, I used the trigger with this in the On Activation Field, grouped to the leader, set to activate once he was in the trigger:

Code: [Select]
stop_following = true

But none of htis worked...the camera started fine...but did not move along with the unit (Leader WGroup).  Here is what I have so far, in the scripts entirety:

Code: [Select]
_cam = "camera" camcreate [0,0,0]
_cam cameraEffect ["internal","back"]

DisableUserInput TRUE


_cam camSetTarget getpos Leader WGroup
_cam camSetRelPos [-8,0,3]
_cam camSetFOV 01.00
_cam camCommit 0
@camcommitted _camera
~.01


?not stop_following : goto "loop"


~10
cutRsc ["default", "PLAIN"]
DisableUserInput FALSE
_cam cameraeffect ["terminate", "back"]
camdestroy _cam


Exit


That is what is activating when the mission starts... but as I said, the camera does not follow the leader unit.  Any help or sugguestinons would be great! Thanks.
« Last Edit: 16 Aug 2005, 21:16:17 by Kilo11 »

Offline Pilot

  • Contributing Member
  • **
Re:Cam settarget #2
« Reply #1 on: 16 Aug 2005, 21:43:40 »
You are mission a #Loop, try this:

Code: [Select]
_cam = "camera" camcreate [0,0,0]
_cam cameraEffect ["internal","back"]

DisableUserInput TRUE

#loop
_cam camSetTarget getpos Leader WGroup
_cam camSetRelPos [-8,0,3]
_cam camSetFOV 01.00
_cam camCommit 0
@camcommitted _camera
~.01


?not stop_following : goto "loop"


~10
cutRsc ["default", "PLAIN"]
DisableUserInput FALSE
_cam cameraeffect ["terminate", "back"]
camdestroy _cam


Exit

-Student Pilot