I'll teach you a little bit about box collision
Just to visualise it in your head picture a map x100 by y100 completly flat and you want to stop the "character"/Camera from going into a box
the box dimentions = 10 by 10
placed at x=50 by y=50 on the map
You'd have to create a box so to speak
e.g.
`Detects if inside the box
If x > 45 and x < 55
If y > 45 and y < 55
x = OldX
y = OldY
endif
endif
i use 45 and 55 as the dimensions of the box = 10 so i minus half of the box to get the left hand side position and add 5 to get the right hand side position
Same with up and down a.k.a. the y value
Another example depending on your level of programming would be:
`Detects if inside the box
If x > Object position x(BOX)-5 and x < Object position x(BOX)+5
If Z > Object position Z(BOX)-5 and Z < Object position Z(BOX)+5
x = OldX
Z = OldZ
endif
endif
Object position x(OBJECT ID) will retrieve where the object is situated at x and so forth..
I shall see if i can make a little example then get back to you, but hope that helps so far