hi man thats a good suggestion and might work in most cases but my problem was that the map could be extremely complex and irregular so i would need a very large data map. any way here is the code i am using.
function scene(scene$)
dim scenedata#(15)
` the program expects 3 files the collision bitmap(a black and white bitmap with colours in green where the player wants exits, the scene bitmap a detailed rendered image of what this scene should actually look like and a scenedata array which hold scene data)
` the scene data elements are as follows
` 0 = starting x position, the x position the character will start at each time this scene is loaded
` 1 = starting y position, as above but y
` 2 = starting z position, as above but z, this acts as the distance from the camera and a default is 30
` 3 = boolean whether distance scaling should be applied, this generally depends on the camera angle of the scene shot
` 4 = the xrotation of the characters in the scene, again determined by angle of shot
` 5,6,7 = intial scale of character X,Y,Z
` 8 = boolean if an NPC is required
` 9,10,11 = position of NPC X,Y,Z
` 12 = Y angle of NPC
` 13,14 = X,Y point player must be to talk to NPC
load image scene$+"coll.bmp",2
load image scene$+"scene.bmp",1
load array scene$+"scenedata.sce",scenedata#(0)
`sets up variable and object/images
create bitmap 2,640,480
create bitmap 1,641,481
load object "boneman.x",1
if scenedata#(8)=1
load object "boneman.x",3
scale object 3,scenedata#(5),scenedata#(6),scenedata#(7)
position object 3,scenedata#(9),scenedata#(10),scenedata#(11)
color object 3,RGB(0,0,100)
xrotate object 3,wrapvalue(scenedata#(4))
yrotate object 3,wrapvalue(scenedata#(12))
SET OBJECT FRAME 3,52
endif
scale object 1,scenedata#(5),scenedata#(6),scenedata#(7)
make object plain 2,640,480
position object 1,scenedata#(0),scenedata#(1),scenedata#(2)
position object 2,0,0,389
texture object 2,1
xrotate object 1,wrapvalue(scenedata#(4))
position camera 0,0,20
y=320
x=240
oldx#=object position x(1)
oldy#=object position y(1)
goingsomewhere=0
pont=0
repeat
stage=0
` bit of collision
if pont=0 then position object 1,oldx#,oldy#,30
gosub checkscene
` shows the colour that is being read
ink RGB(255,255,255),1
set current bitmap 0
text 0,400,"point = "+str$(pont)
` a little code for NPCs
if scenedata#(8)=1
if object position X(1)<scenedata#(13)+1 AND object position X(1)>scenedata#(13)-1 AND object position Y(1)<scenedata#(14)+1 AND object position Y(1)>scenedata#(14)-1
text 0,388,"TALK IF YA WANT"
endif
endif
` holds old character position so collision can refer back to them if a collision happens
oldx#=object position x(1)
oldy#=object position y(1)
` get input from player and act accordingly
if upkey()=1 then position object 1,object position X(1),object position Y(1)+0.1,object position Z(1) : yrotate object 1,0 : stage=1
if downkey()=1 then position object 1,object position X(1),object position Y(1)-0.1,object position Z(1) : yrotate object 1,180 : stage=1
if leftkey()=1 then position object 1,object position X(1)-0.1,object position Y(1),object position Z(1) : yrotate object 1,270 : stage=1
if rightkey()=1 then position object 1,object position X(1)+0.1,object position Y(1),object position Z(1) : yrotate object 1,90 : stage=1
if rightkey()=1
if upkey()=1 then yrotate object 1,45
if downkey()=1 then yrotate object 1,135
endif
if leftkey()=1
if upkey()=1 then yrotate object 1,315
if downkey()=1 then yrotate object 1,225
endif
` pastes the image to bitmap 2 which is then copied to bitmap one (this is useful if your collision bitmap ins't the same size as the screen)
set current bitmap 2
paste image 2,0,0
copy bitmap 2,0,0,639,479,1,0,0,639,479
set current bitmap 1
` get player screen position
x#=object screen x(1)
y#=object screen y(1)
` this check if it is required and tell will scale the player the farther up he move, little vision trick but it seems to work
if scenedata#(3)=1
scale#=y#/350
scale object 1,scale#,scale#*0.8,scale#
endif
` the point command and remember this acts as the sync in the loop as well
pont=RGBG(point(x#,y#))
` basic animation ripped stright out of help
IF stage<>oldstage
IF stage=0
SET OBJECT FRAME 1,52
LOOP OBJECT 1,52,75
SET OBJECT SPEED 1,10
ENDIF
IF stage=1
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,30
SET OBJECT SPEED 1,40
ENDIF
oldstage=stage
ENDIF
until goingsomewhere=1
` always nice to clean up after your self
delete bitmap 1
delete bitmap 2
delete image 1
delete image 2
delete object 1
delete object 2
if scenedata#(8)=1 then delete object 3
undim scenedata#(13)
exitfunction newscene$
' this check for any other colours which will tell the program where the player wants to go
checkscene:
if pont>240 AND pont<250 then text 0,460,"GOING TO OTHER SCENE" : goingsomewhere=1 : newscene$="scene2"
if pont>230 AND pont<240 then text 0,460,"GOING TO OTHER SCENE" : goingsomewhere=1 : newscene$="scene1"
if pont>220 AND pont<230 then text 0,460,"GOING TO OTHER SCENE" : goingsomewhere=1 : newscene$="room1"
if pont>210 AND pont<220 then text 0,460,"GOING TO OTHER SCENE" : goingsomewhere=1 : newscene$="room2"
if pont=12 then text 0,460,"GOING TO WORLD MAP" : goingsomewhere=1 : newscene$="worldmap"
return
endfunction newscene$
cheers
Plugged

Work Hard; Play Harder ;
