Swinging doors in MotS will work now


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]

Posted by Heinz Högel on June 16, 1998 at 16:22:56:

Hi,

in a message some days ago I wrote that rotating (swinging) doors as described in the tutorial don't work in MotS due to a buggy RotatePivot() function (blame LEC for that). It took a while to find a workaround for the misbehavior of that MotS function, but I think I've found a practical way to do it (script h0_swingdoors4.cog).

However, you have to setup the new MotS door script in a different way to the JK Basic script. The hinge thing is no longer only an auxiliary object for calculating the door frames. Every door needs a separate hinge thing (but still of ghost type) permanently located at the actual hinge position. Like the doors in JK Basic the hinge needs certain attributes: THINGFLAGS (0x400448), NUMFRAMES (2) and two FRAMEs. The first frame must be set to the initial position of the hinge (PCH/YAW/ROL all zero!!!). The second one alike, but with YAW set to the opening angle of the door. The door itself needs only one FRAME set to the start position of it.

To hear typical door sounds please add an appropriate template for a ghost thing with an additional adjective like soundclass=sm_door.snd and use that ghost thing as hinge. Add for example the following lines to the mots.tpl file in the JEDDATA folder:

# DESC:
# BBOX: 0 0 0 0 0 0
ghost_hinge_sm none orient=(0/0/0) type=ghost move=path soundclass=sm_door.snd
# DESC:
# BBOX: 0 0 0 0 0 0
ghost_hinge_med none orient=(0/0/0) type=ghost move=path soundclass=med_door.snd
# DESC:
# BBOX: 0 0 0 0 0 0
ghost_hinge_lg none orient=(0/0/0) type=ghost move=path soundclass=lg_door.snd

I also corrected the JK Basic script from the tutorial (now called h0_swingdoors5.cog). The doors can now be opened by "touching" them (hitting the spacebar) and I fixed a small bug in automatic closing.

Seems I'll have to write a second edition of the tutorial dealing with the experiences others and I have made with MotS and rotating doors.

Heinz


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]