So I have a lever set up to when you pull it the camera changes position and the screen clears to black then it just shows the lever being pulled then after this the camera is to go back to the player object.
well it just stays at the position and does not go back to the player object,help.
if cameramode=0 // this is my main camera mode to follow my player
camera(num)
positioncameratoplyr()
show object 2
endif
if OBJECT COLLISION(2, 33)=1 //just my call for text
ImgWrite("PULL LEVER",500,400)
endif
IF OBJECT COLLISION(2, 33)=1 AND returnkey()=1 //call for camera change
PULL=1
cameramode=1
ENDIF
IF cameramode=1 //this is the camera change and cameramode change
cls
color backdrop rgb(128,128,128)
position camera 0,109,550,-186 //see, I position camera here away from my player
hide object 2
waitforscreen2=waitforscreen2+1
ENDIF
if waitforscreen2=20
cameramode=2
endif
IF PULL=1 AND PULLED=0 and cameramode=2 // this is my animation
set object speed 33,50
PLAY object 33,0,14
PULLED=1
PULL=0
ENDIF
w#=object frame(33) //if my lever last animation played then another animation plays
if w#<13.0
inc w#,1.0
if w#>=13.0 and wheelsrotate=0
whells=1
endif
w#=13.0
endif
rem cog whells // my cog wheels animation
IF whells=1 and wheelsrotate=0
set object speed 32,40
play object 32,0,143
for d3= 28 to 29
set object speed d3,10
play object d3,0,30
next d3
wheelsrotate=1
whells=0
ENDIF
w2#=object frame(32) //after my cog wheels animation plays my camera should change to follow my player agien becouse cameramode=0 but it does not.
if w2#<143.0
inc w2#,1.0
if w2#>=143.0
cameramode=0
endif
w2#=143.0
endif
EDIT, IT IS SHOWING MY OBJECT 2 PLAYER AFTER THE CHANGE BUT NOT REFOLLOWING IT.
my signature keeps being erased by a mod So this is my new signature.