Posted: Wed Jan 18, 2006 5:20 pm Post subject: (No subject)
You are stuck because "button" will never = 2. If the left button is down it = 1, if the middle button is down it = 10, and if the right button is down it = 100.
Sponsor Sponsor
jam jam
Posted: Wed Jan 18, 2006 5:28 pm Post subject: (No subject)
but it then says taken has not been declared yet. how do i fix that
Albrecd
Posted: Wed Jan 18, 2006 5:43 pm Post subject: (No subject)
Do you have
Mouse.ButtonChoose ("multibutton")
in your code?
jam jam
Posted: Wed Jan 18, 2006 6:02 pm Post subject: (No subject)
it doesn't seem to be working. Is this what i'm suppose to do?
function player_move :int
Mouse.ButtonChoose ("mulitbutton")
var x, y, button:int
loop
Mouse.Where (x,y,button)
if button=2 then
if x>=5 and x<205 and y>=5 and y<=205 then
if not (taken(6)) then
result 6
end if
elsif x>=205 and x<405 and y>205 and y <=205 then
if not (taken(5)) then
result 5
end if
elsif x>=405 and x<600 and y>=405 and y<=600 then
if not (taken(4))then
result 4
end if
elsif x>=5 and x<=205 and y>=205 and y<=405 then
if not (taken(7)) then
result 7
end if
elsif x>=5 and x<405 and y>=5 and y<=405 then
if not (taken(2)) then
result 2
end if
elsif x>=205 and x<=405 and y>=5 and y<=205then
if not (taken (1))then
result 1
end if
elsif x>205 and x<=405 and y>=405 and y<=600then
if not (taken (9))then
result 9
end if
elsif x>405 and x<600 and y>=5 and y<=206 then
if not (taken (8))then
result 8
end if
elsif x>=405 and x<600 and y >=205 and y<=405 then
if not (taken(3))then
result 3
end if
end if
end if