DF-21 Forums Forum Index DF-21 Forums
The Dark Forces Community
 
DF-21.net Home | FAQ | Search | Memberlist  | Register 
Profile | Log in to check your private messages | Log in

Switches and Doors

 
Post new topic   Reply to topic    DF-21 Forums Forum Index -> Dark Forces Levels & Editing
View previous topic :: View next topic  
Author Message
Nikana
Ree-Yees

Joined: 17 Aug 2006

PostPosted: Feb 18, 2008 03:24    Post subject: Switches and Doors View user's profile Send private message Reply with quote

Hello everyone! I haven't been here in ages, though I have however started tinkering around with some of my Dark Forces files again lately. Anyway, I have a question about the inf needed to get a switch to operate a certain door...

I'm not very experienced with inf but I think I'm close to getting the result I want so just bear with me. What I'm wanting to do is have a door that only opens by way of a switch located on an adjacent wall. As it stands right now, the door will open by way of either nudging the door, OR pressing the switch. I want to eliminate the ability to open the door by nudging, and have only the switch activate the door.

Right now the inf I have for the switch is:

seq
class: trigger toggle
event: 48
client: leftdoor
seqend

(is trigger toggle even the correct type?)

The inf for the door is:

seq
class: elevator door
event_mask: 0
speed: 4
seqend

I have the door as a flag:2 as a class E. door

As I said the door currently opens by either nudging the door, or pressing the switch, so I think I'm close, I'm just not sure what to do have it be just right. Could someone maybe write out what the proper inf coding should be? This is probably really basic stuff for some of you, but like I said I haven't worked with much inf in the past, so any help would be highly appreciated.

Thanks!

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Feb 19, 2008 22:08    Post subject: View user's profile Send private message Send e-mail Reply with quote

Inf and flag2==door are separate ways of making a door and should not be used together. Turn off the flag, as it basically replaces the INF you put in with hard-coded INF to make the door open when you use it.

Toggle trigger type means once you've turned a switch on you can turn it off again. You probably don't want this (a door switch should stay on until the door closes), although I forget about the other switch types... single maybe? You can send a reset message to the switch when the door closes (reaches it's first stop) to make it usable again.

Your door/elevator needs two stops. The first should be @0, and the floor and ceiling of the sector should be equal, for a closed door*. The second should be the number of DFUs you want the door to open (prefix with a @), so @8 for a small 8x8 door.

* - The door flag uses a ceiling height for an OPEN door because otherwise it has no way to know how far the door should open when you use it. It's a bit of a hack, really. A closed door has the ceiling height the same as the floor height, and since your door starts out closed you'll have to set ceiling and floor heights appropriately.

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Nikana
Ree-Yees

Joined: 17 Aug 2006

PostPosted: Feb 21, 2008 06:38    Post subject: View user's profile Send private message Reply with quote

Thanks for the help, Mega. I'm getting closer but I still don't quite have it.

Now the inf I have for the switch is:

seq
class: trigger switch1
event: 48
client: leftdoor
seqend

the inf I now have for the door is:

seq
class: elevator door
speed: 4
stop: @0 hold
stop: @8 8
seqend

I removed the 2-flag from the door, however the door still opens when I nudge it, and the switch operates the door, yet doesn't reset when the door closes, so it can't be used again. I just want only the switch to operate the door, and to reset to its original state when the door closes.
Any thoughts?

Fenwar
Admiral Ackbar
Admiral Ackbar

Joined: 15 Sep 2003

PostPosted: Feb 21, 2008 08:54    Post subject: View user's profile Send private message Reply with quote

I haven't INFed for a good couple of years, but I reckon you want the "event_mask: 0" in your door definition - that will stop the nudging now that you've removed the door flag.

Then you need to send a reset message from stop 0 of your door, so when it closes it tells the switch to reset. Syntax escapes me but its something like
"message: 0 switchsector wallnumber reset"

I'm sure someone will correct me (or WDFUSE might have a wizard that takes care of it).

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Feb 21, 2008 18:33    Post subject: View user's profile Send private message Send e-mail Reply with quote

The event_mask thing will indeed stop nudging from working. And the message is needed at the first stop to reset the switch. WDFUSE's INF wizard thing should help you generate the inf you need for that IIRC.

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Nikana
Ree-Yees

Joined: 17 Aug 2006

PostPosted: Feb 21, 2008 23:48    Post subject: View user's profile Send private message Reply with quote

I found a switch/door combo in a another level that operates the way I want mine to. So, using that as a base, this is the inf I have now...

Switch:
seq
class: trigger switch1
event: 48
client: leftdoor
seqend

Door:
seq
class: elevator door
event_mask: 0
speed: 5
stop: @0 hold
message: 0 hall(7) done
stop: @8 8
seqend

As I said I've modeled my inf just like the inf used in the example I found, the only problem now is that for some weird reason neither the switch or nudging will operate my door. What else could I do?

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Feb 23, 2008 14:57    Post subject: View user's profile Send private message Send e-mail Reply with quote

You assigned an event of 48 to your switch... but your door ignores all events! You need an event_mask which includes the event you assigned to the switch.

I'm not sure but simply removing the event line from the switch might also make it work. Otherwise your event_mask needs to include one of the events your switch triggers (right now it seems to trigger 16 and 32, when it only needs to trigger one event).

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Nikana
Ree-Yees

Joined: 17 Aug 2006

PostPosted: Feb 24, 2008 21:22    Post subject: View user's profile Send private message Reply with quote

Well it seems that removing the event line from the switch got everything working right. Thanks again for the help!

Display posts from previous:   
Post new topic   Reply to topic    DF-21 Forums Forum Index -> Dark Forces Levels & Editing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group