(Created page with "== Doors == Now it is time to go over making and interacting with doors. Keep in mind that everything in Dark Forces that moves is an elevator. This means that doors as well, are just different variations of elevators. One important to keep remember is that while you can always make a door with INF logic, it is '''much easier''' to just set the Flag 1 options to 2 (Door). none|thumb|400x400px With that out of the way lets continue to the '''DOORS1'...") |
(→Doors) |
||
Line 1: | Line 1: | ||
== Doors == | == Doors == | ||
Now it is time to go over making and interacting with doors. Keep in mind that everything in Dark Forces that moves is an elevator. This means that doors as well, are just different variations of elevators. One important to keep remember is that while you can always make a door with INF logic, it is '''much easier''' to just set the Flag 1 | Now it is time to go over making and interacting with doors. Keep in mind that everything in Dark Forces that moves is an elevator. This means that doors as well, are just different variations of elevators. One important to keep remember is that while you can always make a door with INF logic, it is '''much easier''' to just set the Flag 1 value to '''2''' (Door). | ||
[[File:DoorFlag.png|none|thumb|400x400px]] | [[File:DoorFlag.png|none|thumb|400x400px]] | ||
With that out of the way lets continue to the '''DOORS1''' room. | With that out of the way lets continue to the '''DOORS1''' room. | ||
Line 6: | Line 6: | ||
For this part you may want to move the Player Start so you start immediately in this room. | For this part you may want to move the Player Start so you start immediately in this room. | ||
[[File:DoorsRoomPlayer.png|none|thumb|603x603px]] | [[File:DoorsRoomPlayer.png|none|thumb|603x603px]] | ||
In front of you are three doors. Lets look at the logic of the one on the left | In front of you are three doors. Lets look at the logic of the one on the left called '''DOOR1''' | ||
seq | seq | ||
class: elevator door | class: elevator door | ||
seqend | seqend | ||
If you run this in the game you will realize that this is a normal door. In fact, it is identical to you just setting flag value 2 in your Sector Editor. | |||
Look at '''DOOR2''' in the middle. It behaves exactly the same but it makes a different sound. That's because it is a different type of elevator. | |||
seq | |||
class: elevator inv | |||
speed: 30 | |||
event_mask: 32 | |||
stop: 0 hold | |||
stop: 16 5 | |||
seqend | |||
You can see it is an elevator of type '''elevator inv''' which moves the ceiling altitude. In this case from height 0 to 16. You interact with it by nudging the line from the outside ('''event_mask''' '''32'''). This is yet another, albeit more complicated way of making a door. | |||
Now the reason the audio is different for this door is because all elevators have different default audio assigned to them. Here is a nice chart showing all the default values of by elevator type. | |||
{| class="fandom-table" | |||
| | |||
(elevs change_light, change_wall_light, scroll_floor, scroll_ceiling, and scroll_wall) | |||
<nowiki>|</nowiki> sound: 1 0 | |||
<nowiki>|</nowiki> sound: 2 0 | |||
<nowiki>|</nowiki> sound: 3 0 | |||
(elevs move_floor, move_fc, basic, basic_auto, change_offset, door_inv and bottom half | |||
of door_mid) | |||
<nowiki>|</nowiki> sound: 1 elev2-1.voc | |||
<nowiki>|</nowiki> sound: 2 elev2-2.voc | |||
<nowiki>|</nowiki> sound: 3 elev2-3.voc | |||
(elevs move_ceiling, inv, morph_move1, morph_move2, morph_spin1, morph_spin2, move_wall | |||
, rotate_wall and top half of door_mid) | |||
<nowiki>|</nowiki> sound: 1 door2-1.voc | |||
<nowiki>|</nowiki> sound: 2 door2-2.voc | |||
<nowiki>|</nowiki> sound: 3 door2-3.voc | |||
(elevator door) | |||
<nowiki>|</nowiki> sound: 1 door.voc | |||
<nowiki>|</nowiki> sound: 2 0 | |||
<nowiki>|</nowiki> sound: 3 0 | |||
(trigger standard) | |||
<nowiki>|</nowiki> sound: 0 | |||
(triggers switch1, single and toggle) | |||
<nowiki>|</nowiki> sound: switch3.voc | |||
|} | |||
Lets walk to '''DOOR 3''' . You will notice that it moves from top to bottom. In reality it is just a standard '''elevator move_floor''' but is built as a door. | |||
seq | |||
class: elevator move_floor | |||
sound: 1 DOOR2-1.VOC | |||
speed: 10 | |||
event_mask: 32 | |||
stop: 16 hold | |||
stop: 0 5 | |||
seqend | |||
We've changed the sound effect so it sounds more like a door instead of an elevator default audio. | |||
[[File:Door3.png|none|thumb|890x890px]] | |||
Take a closer look and you will see that the walls are not anchored. This is the same problem that you've seen earlier in the tutorial. Remember, you can fix this by adding the '''Flag 16''' ('''Wall Anchored''' flag). | |||
=== Trigger Door Opens === | |||
Now |
Revision as of 13:13, 2 July 2022
Doors
Now it is time to go over making and interacting with doors. Keep in mind that everything in Dark Forces that moves is an elevator. This means that doors as well, are just different variations of elevators. One important to keep remember is that while you can always make a door with INF logic, it is much easier to just set the Flag 1 value to 2 (Door).
With that out of the way lets continue to the DOORS1 room.
For this part you may want to move the Player Start so you start immediately in this room.
In front of you are three doors. Lets look at the logic of the one on the left called DOOR1
seq class: elevator door seqend
If you run this in the game you will realize that this is a normal door. In fact, it is identical to you just setting flag value 2 in your Sector Editor.
Look at DOOR2 in the middle. It behaves exactly the same but it makes a different sound. That's because it is a different type of elevator.
seq class: elevator inv speed: 30 event_mask: 32 stop: 0 hold stop: 16 5 seqend
You can see it is an elevator of type elevator inv which moves the ceiling altitude. In this case from height 0 to 16. You interact with it by nudging the line from the outside (event_mask 32). This is yet another, albeit more complicated way of making a door.
Now the reason the audio is different for this door is because all elevators have different default audio assigned to them. Here is a nice chart showing all the default values of by elevator type.
(elevs change_light, change_wall_light, scroll_floor, scroll_ceiling, and scroll_wall) | sound: 1 0 | sound: 2 0 | sound: 3 0 (elevs move_floor, move_fc, basic, basic_auto, change_offset, door_inv and bottom half of door_mid) | sound: 1 elev2-1.voc | sound: 2 elev2-2.voc | sound: 3 elev2-3.voc (elevs move_ceiling, inv, morph_move1, morph_move2, morph_spin1, morph_spin2, move_wall , rotate_wall and top half of door_mid) | sound: 1 door2-1.voc | sound: 2 door2-2.voc | sound: 3 door2-3.voc (elevator door) | sound: 1 door.voc | sound: 2 0 | sound: 3 0 (trigger standard) | sound: 0 (triggers switch1, single and toggle) | sound: switch3.voc |
Lets walk to DOOR 3 . You will notice that it moves from top to bottom. In reality it is just a standard elevator move_floor but is built as a door.
seq class: elevator move_floor sound: 1 DOOR2-1.VOC speed: 10 event_mask: 32 stop: 16 hold stop: 0 5 seqend
We've changed the sound effect so it sounds more like a door instead of an elevator default audio.
Take a closer look and you will see that the walls are not anchored. This is the same problem that you've seen earlier in the tutorial. Remember, you can fix this by adding the Flag 16 (Wall Anchored flag).
Trigger Door Opens
Now