User talk:Equalizer5118

From Valve Developer Community
Jump to navigation Jump to search

Hello. I don't check here that often, so if its urgent ping be on discord (add a # between the r and the 5)

WIP comp_pack page

The following is a WIP for a page I am in the process of creating.

Template:Point ent It is also available in Portal 2: Community Edition Portal 2: Community Edition. It is a point entity that packs selected models/materials/sounds/soundscripts into the BSP file when compiling, essentially eliminating the need to manually pack files with Bspzip.

Multiple comp_packs can be used in conjunction to pack multiple files into the BSP.

Warning.pngWarning:Always compile the map first to check and see if the file you want already got automatically packed. This should only be used if the file you need refuses to get automatically packed.

KeyValules

coming soon

See Also

Wip door creation

{{lang|Door creation|title¿Door Creation}} In this tutorial, you will learn how to create a functioning brush-based door. == Brush or Point Based? == It is important to know the difference between a [[brush entities|brush]]-based and a point-based door. == Basics == To create a brush-based door, create a gap in the wall as a doorspace. See [[dimensions]] for sizing. To make the gap, split the wall in half and place a small [[brush]] over the top of the doorspace. Make sure that there is floor underneath the doorspace, otherwise there will be a [[leak]]. [[Image:Door creation 1.png]] == Creating a brush for the door == To start making the door, fill the doorspace with a brush. The brush should be a different texture from the wall (wood wall textures are good). [[Image:Door creation 2.png]] == Turning the Brush Into the Door == To turn the brush into a door, right click on it while it is selected in one of the 2D views. Then select 'Tie to Entity' and from the entity list select either {{ent|func_door_rotating}} for normal doors or {{ent|func_door}} for up/down sliding doors. If the door is to slide, select <code>func_door</code> and scroll down the options until you reach 'Move Direction (Pitch Yaw Roll)' and select either up or down from the small box next to the select options bar. For rotating doors, you'll probably want to adjust the rotation point either by moving the blue ball (in the 3d view) using the 2d view, or by adjusting the 'Origin'. Once this is done, to open the door (in-game), walk into it. To make it into a "use" door, double click on it in 3d view, select the "flags" tab on the properties window. Select "use opens" and de-select "touch opens." == Making a Button for Your Door == Name your door something like <code>door1</code>. To make a button for the door, create a small brush (can be any shape you want), and tie it (via <i>Tie to Entity</i>) to {{ent|func_button}}. Name your button as well (e.g., <code>door1_button</code>). Then, once you have selected 'Apply', select 'Outputs' and 'Add Output'. The output should be: :{| {{OutputsTable}} | [[Image:Io11.png]] || OnPress || door1 || Open ||   || 0.00 || No |} <br> Then press 'Apply' again, to make the button.<br> When you test the map, walk up to the button and press 'Use'. The door should then open. == Making Double Doors == To make two <code>func_door</code>s or <code>func_door_rotating</code>s open and close together, it is necessary to use a combination of Outputs and {{ent|logic_relay}}s. First, make two doors through the process stated above and name them accordingly (e.g., <code>door1</code> and <code>door2</code>). Second, add two logic_relay's somewhere near the doors (the location is not important, but it helps for organizational reasons to keep them close) and name them as well (e.g., <code>door1_relay</code> and <code>door2_relay</code>). Third, open the properties of the first door, go to the 'Outputs' tab, and add an output similar to the following: :{| {{OutputsTable}} | [[Image:Io11.png]] || OnOpen || door2 || Open ||   || 0.00 || No |} <br> Do this for the other door too, but change the Target Entity to <code>door1</code>. What these outputs do is open one door when another one is opened (whether that be done via Touch, Toggle, a button, etc.). At this point, you could save and compile to test the doors out if you wanted, but they would only be able to open each other, not close each other. That is where the logic_relay's come in. <br> <br> Now normally, you would think that you could repeat the process for closing the doors via Outputs (i.e., having one door be closed by the other), but such is not the case. If you try it out for yourself, you will find that the game crashes as soon as you go to close one of the doors. So, to work around this little bug, you need to introduce a <code>logic_relay</code> for each door. If you've followed the above process so far, you should already have the two relays placed and named. Now, open the properties of the first door and add an output similar to this: :{| {{OutputsTable}} | [[Image:Io11.png]] || OnClose || door1_relay || Trigger ||   || 0.00 || No |} <br> Again, repeat this for the other door, changing the Target Entity to <code>door2_relay</code>. Next, open the properties for the first relay and add an output like so: :{| {{OutputsTable}} | [[Image:Io11.png]] || OnTrigger || door2 || Close ||   || 0.00 || No |} <br> Repeat this for the other relay, changing the Target Entity to <code>door1</code>. Now save and compile, and you should have a working set of double doors. <br> <br> To help you understand this concept of Outputs and logic_relay's better, here is a little diagram for the above example: Player opens <code>door1</code> -->The opening of <code>door1</code> triggers <code>door2</code> to open via the Output of <code>door1</code> Player opens <code>door2</code> -->The opening of <code>door2</code> triggers <code>door1</code> to open via the Output of <code>door2</code> Player closes <code>door1</code> -->The closing of <code>door1</code> triggers <code>door1_relay</code> -->The triggering of <code>door1_relay</code> triggers <code>door2</code> to close Player closes <code>door2</code> -->The closing of <code>door2</code> triggers <code>door2_relay</code> -->The triggering of <code>door2_relay</code> triggers <code>door1</code> to close [[Category:Level Design]] [[Category:Tutorials]]