Need help with script!

Circuit I need help with postions.
I have a room that has a cave. but you just come out of the other side. How do i script it where when you walk to the entrance it poofs you to the exit?
like

}
if posn("30,150" {
 posn("60, 96);
}

something like this?
i can't quit figure it out.
any help would be appreciated.
thanks,
Circuit
Circuit Ok, i found another game with caves and i looked at it but i still don't understand it.
it looked like this:

}
if (posn(o0,20,138,30,154)) {
 v220 = 3;
 set(f0);

ok, i understand the posn line but the v220 = 3 and set line have me confused. how can i turn this line into taking me to:

start point (74,150)
end point  ( 83, 150)
i need to get from start to end but not walk there, just at that loc pop at other loc.
bokkers Hi Circuit,

ok, i understand the posn line but the v220 = 3 and set line have me confused. how can i turn this line into taking me to:

start point (74,150)
end point  ( 83, 150)


I suppose you're talking about the room which shows the inside of the cave and you want to take the player to a new position.
You would write:

if (posn(o0,20,138,30,154)) {
 position(o0,74,150);
 move.obj(o0,83,150);
}

With this, the player will be relocated to 74,150 and will then walk automaticly to 83,150.
But it might look a bit bizarre. Are you sure you didn't mean makeing the player appear in a new room? If so, you would need

if (posn(o0,20,138,30,154)) {
 new.room(xy);      // with xy being the no. of the new room
}

In the new room, you would have to include the two lines:
 position(o0,74,150);
 move.obj(o0,83,150);
in the very first section of the logic which begins with
 if (new_room) {
 
Hope I could help you.
b.o.k.


brian corr am i right in thinking that this cave is like a tunnel and you enter it and then exit to another tunnel? if i am, then your best bet is this:

if(posn(o0,x,y,x,y)){ //where x,y,x,y arethe points ofa square
 reposition.to(o0,x,y); //where x,y are in the exit cave
 set.dir(o0,x); //x is direction: 1 for up-right, 2 for right, etc.
}
Circuit Actualy i ment as if you didn't see the inside. say you got a cave entrance at the bottom and the exit is at the top of the screen (cliff side) on the same screen. what i wanted was to go in the first entrance and apear at the other. as if he went through the cave.
but i got it now, and i have to say this agi is pretty neat. i got a nice demo that im going to work off of and make a big game.Im not good with graphics, so im going to grab a few pics off of some old sierra games & edit a few of them to the way i want them. I may attempt to draw some, but im a better programmer than an artist. I wish some artist put up an agi site. where he does nuthing but agi art. that way people could use his work in their games.
hehhe
thanks,
Circuit