Code: Select all
if button==2 then
-----------------------------------------------------------------------------------northwest
if LocalX < 1 and LocalY < 1 and LocalX > -64 and LocalY > -64 then
object_chunk_northwest[LocalX+64][LocalY+64]=1; update_objects("northwest"); end
-----------------------------------------------------------------------------------west
if LocalX < 1 and LocalY < 65 and LocalY > 0 and LocalX > -64 then
object_chunk_west[LocalX+64][LocalY]=1; update_objects("west"); end
-----------------------------------------------------------------------------------center
if LocalX > 0 and LocalY > 0 and LocalX <65 and LocalY<65 then
object_chunk[LocalX][LocalY]=1; update_objects("center"); end
-----------------------------------------------------------------------------------north
if LocalX > 0 and LocalY < 1 and LocalX<65 and LocalY>-64 then
object_chunk_north[LocalX][LocalY+64]=1; update_objects("north"); end
-----------------------------------------------------------------------------------southwest
if LocalX > -64 and LocalY > 64 and LocalX <1 and LocalY<129 then
object_chunk_southwest[LocalX+64][LocalY-64]=1; update_objects("southwest"); end
-----------------------------------------------------------------------------------northeast
if LocalX > 64 and LocalY > -64 and LocalX <129 and LocalY<1 then
object_chunk_northeast[LocalX-64][LocalY+64]=1; update_objects("northeast"); end
-----------------------------------------------------------------------------------east
if LocalX > 64 and LocalY < 65 and LocalX <129 and LocalY>0 then
object_chunk_east[LocalX-64][LocalY]=1; update_objects("east"); end
-----------------------------------------------------------------------------------south
if LocalX > 0 and LocalY < 129 and LocalX <65 and LocalY>64 then
object_chunk_south[LocalX][LocalY-64]=1; update_objects("south"); end
-----------------------------------------------------------------------------------southeast
if LocalX > 64 and LocalY < 129 and LocalX <129 and LocalY>64 then
object_chunk_southeast[LocalX-64][LocalY-64]=1; update_objects("southeast"); end
So let's guess that local x and local y belong to northwest, the code is executed but it still checks whether it's in west, center, north etc (which is not possible). After the execution of northwest for example, I want to end the block and NOT continue to execute the other if's.
I know it's possible, just don't know the syntax.