hi community, iam new in dbpro, and i like it so far.
iam busy making a program, but i get stuck in some code i writed:
see code:
_control_escape:
rem mouse release
if escapekey() = 1
show mouse
x=mousex()
y=mousey()
if x<0 then position mouse 0,y
if x>1024 then position mouse 1024,y
if y<0 then position mouse x,0
if y>768 then position mouse x,768
else
rem ingame
if escapekey() = 0
rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0
x=mousex()
y=mousey()
if x<512 then position mouse 512,y
if x>512 then position mouse 512,y
if y<384 then position mouse x,384
if y>384 then position mouse x,384
endif
endif
return
so my intention was if i pressed the ESC key, i wanted to release the mouse, otherwise if i not press the ESC key, my mouse key is not released, which its good.
but and heres my question, why is it not working? i keep press the esc key and the release key is working, if i not press the esc key its not working... i dont get it.
so would anyone help me with this? thanx already.