Obviously no one bothered too take a second glance at your scripting.
I saw several things that may not cause errors however are not the best way too do things.
example you typed:
_camera = camcreate getpos p1
_camera camCommit 5
this may work however I am doubting it, because you never defined what "_camera" is.
you just told the system too create it, obviosly you need too define what this "_camera" is.
I would erase that and put in this instead:
_cam = "Camera" camcreate [0,0,0]
_cam cameraeffect ["Internal", "back"]
Now, this will create a camera just as it does in the triggers, however this camera can be told what too do with other camera commands.
However Obviously you dont want your camera at the very edge of the map at point [0,0,0]
so next put in
_cam camsettarget p1
_cam camsetpos [(getpos p1 select 0)+2,(getpos p1 select 1)+2,(getpos p1 select 2)+1.4]
_cam camcommit 0
@camcommitted _cam
that will move the camera too the position you will need, this can be tweeked around with the camsetpos command if you want the position at other places.
also you put
cameraEffect["Fixed", "Back"]
Camera effects are really pointless and unneeded because you can just user camsetpos, or camsetrelpos.
And you also put
_camera camSetTarget p1
_camera camSetTarget getPos p1
You gave the camera too targets, one is where p1 is currently standing and another is p1 himself, I would take that out and put in "_cam camsettarget p1"
And you also put
_camera = camcreate getpos p2
The only problem is you already have a _camera and are trying too create a second. This can cause many errors, so instead of that just put in _cam camcommit 0.
And you put
_camera camSetRelPos [10,5]
You only put in two variables [x,y] however no z, you should put in [10,5,2]
instead of just those two.
and finnally you put in
Camdestroy
The system will obviosuly have no idea on What camera too destroy as you told it nothing, take that out and put in
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
so instead of your script try putting in this:
_cam = "Camera" camcreate [0,0,0]
_cam cameraeffect ["Internal", "back"]
_cam camsettarget p1
_cam camsetrelpos [10,5,2]
_cam camcommit 0
@camcommitted _cam
~5
_cam camsettarget p2
_cam camsetrelpos [10,5,2]
_cam camcommit 5
@camcommitted _cam
~10
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
That will fix your problem.
If you have any other problems, or wish too do anything else PM me, camera scripting is my strongsuit as well as my favorite form of scripting.
Post count number one.