Hi everyone,
I was making a spectator script (basicly a cam roams freely anywhere in the map), it helps shooting videos and discovering bugs in my level.. here's wut I got so far..
;Artificial Intelligence Script
;Header
desc = Spectator
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpressentertouse.tga,hudname=driveprompt,hudhide=1,hudmake=display
:state=0:makecamera=SpectatorCam
:state=0:dimvar=TempX,dimvar=TempY,state=1
:state=1,plrdistwithin=100:hudshow=driveprompt,hudfadeout=driveprompt
:state=1,plrdistwithin=100,plrusingaction=1:startmenu,viewcam=SpectatorCam,plrcoloff,cameraposx=SpectatorCam $EPX,cameraposy=SpectatorCam $EPY,cameraposz=SpectatorCam $EPZ,state=2
:state=2:hudunshow=PlrLives,hudunshow=PlrLivesNum,hudunshow=PlrHealth,hudunshow=PlrHealthNum,hudunshow=GunPic,hudunshow=PlrAmmo,state=3
:state=3,keypressed=32 1:inccameraposz=SpectatorCam 5
:state=3,keypressed=30 1:inccameraposz=SpectatorCam -5
:state=3,keypressed=57 1:inccameraposy=SpectatorCam 5
:state=3,keypressed=46 1:inccameraposy=SpectatorCam -5
:state=3,keypressed=31 1:inccameraposx=SpectatorCam 5
:state=3,keypressed=17 1:inccameraposx=SpectatorCam -5
;///// Make humvee cam look around based on mouse movement
:state=3:setvar=TempY $MMX,divvar=TempY 10,addvar=TempY $CAY_SpectatorCam
:state=3:cameraangy=SpectatorCam %TempY
:state=3:setvar=TempX $MMY,divvar=TempX 10,addvar=TempX $CAX_SpectatorCam
:state=3:cameraangx=SpectatorCam %TempX
it works (almost fine) I just want the camera to move wherever it's looking not at constant directions, cause for example if I change camera direction by 180 degrees left becomes right and forward becomes backward..
Thank You...