OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mitrokhin on 29 Aug 2002, 22:07:34
-
hey I've tried this script to make the camera move but everytime it says invalid number in expression
_cam01 CamSetTarget UnitName
_cam01 CamSetRelPos[5,5,1.7]
Camcommit 0
~10
_cam01 CamSetRelPos[-5,5,1.7]
CamCommit 10
@CamCommitted_cam01
someone help something ain't right! :P
-
hey I've tried this script to make the camera move but everytime it says invalid number in expression
_cam01 CamSetTarget UnitName
_cam01 CamSetRelPos[5,5,1.7]
Camcommit 0
~10
_cam01 CamSetRelPos[-5,5,1.7]
CamCommit 10
@CamCommitted_cam01
someone help something ain't right! :P
First question is this the entire script? If so you are missing part.
_cam01 = "camera" camcreate [0,0,0]
_cam01 cameraeffect ["Internal","Back"]
_cam01 camcommit 0
The other thing I noticed is no space between CamSetRelPos [-5,5,1.7]
If I am incorrect maybe you could post the entire script so people can see it and help you out. :)
-
I will have to take the blaim for this one, I didn't realise that cyberpunk didn't know how to camscript at all.
Anyway, the error arises from the fact that you have no camera, like crow pointed out. Follow his instructions and you are home free =)
Oh, there doesn't have to be a space between CamSetRelPos and [5,5,1.7], I never put it in and my camscripts are flawless =)
Sorry for misleading you cyberpunk, I'll be more specific next time.
-
there is still a problem every time I preview the mission with that script it says 'Invalid number in expression' why when I've checked the script letter for letter (or possible number for number)?
cyberpunk
-
Just found out what you are doing wrong.
@CamCommitted_cam01 <- This is way wrong. This is what's causing the invalid expression.
It should read:
@CamCommitted _Cam01 <- Notice the space between ...tted and _cam01? There has to be a space there, or it will be read as one word, which is an invalid expression to OFP.