Community

AGI Programming => Mega Tokyo AGI Archive => Topic started by: b.o.k. on September 21, 2001, 10:35:27 AM

Title: Diagonal doors ?
Post by: b.o.k. on September 21, 2001, 10:35:27 AM
Hi there,
I have a problem with diagonal doors: When the door is closed, I cant stop the player from walking through it.
I used this for the door:

load.view(34);
 set.view(o2,34);
 position(o2,19,127);
 set.loop(o2,0);
 set.cel(o2,3);
 observe.objs(o2);
 draw(o2);

I tried observe.objs also for the ego, but without any effect. What is missing?
b.o.k.
Title: Re: Diagonal doors ?
Post by: david on September 21, 2001, 06:06:15 PM
have you tried

stop.motion(ego);

?

if (said("open","door")) {
 if (posn(ego,?,?,?,?)) {
   stop.motion(ego);
   program.control();
   end.of.loop(blahblah);
 }
 else {
   print("get closer dumbass.");
 }
}

i hope this helps you
Title: Re: Diagonal doors ?
Post by: brian corr on September 22, 2001, 04:47:21 AM
the problem youre having is that the block created by an object is on its bottom row of pixels. so what you need to do is put a blue control line where the door goes - make the rest black.
then...

if(door_open){
 ignore.blocks(o0);
 }
else{
 observe.blocks(o0);
 }

the add appropriate code for opening and closing the door - make sure you have the flag door_open in there

brian
Title: Re: Diagonal doors ?
Post by: bok on September 23, 2001, 11:36:16 AM
Hey, thanks a lot! ;D