Author Topic: Diagonal doors ?  (Read 1537 times)

0 Members and 1 Guest are viewing this topic.

b.o.k.

  • Guest
Diagonal doors ?
« 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.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »



david

  • Guest
Re: Diagonal doors ?
« Reply #1 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
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

brian corr

  • Guest
Re: Diagonal doors ?
« Reply #2 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
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

bok

  • Guest
Re: Diagonal doors ?
« Reply #3 on: September 23, 2001, 11:36:16 AM »
Hey, thanks a lot! ;D
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.045 seconds with 18 queries.