Editing FAQ - Troubleshooting & How-To: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Line 86: Line 86:
'''Q. How do I make something switch from frobable to unfrobable like a used lever (or vice versa, like contents in a chest or drawer you don't want prematurely frobable)?'''
'''Q. How do I make something switch from frobable to unfrobable like a used lever (or vice versa, like contents in a chest or drawer you don't want prematurely frobable)?'''


'''A.''' Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property "start_frobable" 1 or 0 depending on your case, and a triggering entity targeting it that triggers the switch.
'''A.''' Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property "start_frobable" 1 or 0 depending on your case (it affects everything inside), and a triggering entity targeting the set_frobable entity that triggers the switch.


'''Q. How do I make breakable glass?'''
'''Q. How do I make breakable glass?'''

Revision as of 19:54, 30 January 2012

Below are some common issues and questions mappers have had in the Editor's Guild forum with common solutions.

Troubleshooting FAQ

Q. Some of my brushes have disappeared or turned black and won't render.

A. This can happen when two touching brushes around the seam are not perfectly flush with one another and the rendering hiccups for those brushes & brushes behind it, either there's a tiny wedge or overlap or gap or weird angle between them. The usual solution is to make sure the brushes are snapped to the grid and perfectly flush against one another, or more generally to simplify the brushwork around the seam of the disappearing brushes.


Q. My AI will not pass through a visportal no matter how I set up the path nodes.

A. Check that the sides of the visportal use the nodraw texture (except for the portal-face itself of course).


Q. My visportal is not closing like it should (you can check this with by typing "r_showportals 1" in the console).

A. A common reason for that is that the two areas separated by the portal are not hermetically sealed and there's an internal leak, either (1) there may be an unportaled gap between the two, possibly covered up by func_static (which do not seal) or possibly caused by an inadvertent hole created by the first FAQ question above, or (2) an internal leak can happen when all sides of the visportal are not flush against sealing brushes. (Burying visportals into brushes also is possible but some people don't recommended it as much as making them flush with the brushes). A way to check if there's an internal leak, and locating it if there is, is described here: Visportals#Trouble-shooting. Other reasons it might fail are also described there.


Q. I can see other rooms behind a mirror through it, instead of just a reflection.

A. The area behind a mirror should be in a separate leaf (visportaled area) with a working visportal. This problem usually means the two areas aren't in separate leafs or there's an internal leak between the areas in front of and behind the mirror.


Q. My streetlight, candle, lamp, light-creating object, causes a weird shadow I want to get rid of.

A. Put the spawnarg "noshadows" "1" on the offending object.


Q. How do you get AI to walk on complex terrain patches or func_statics?

A. You can always lay down invisible monsterclip brushes and the AI can walk on it. Overlay with a brush with a "material" texture so it causes the right sound for footsteps.


Q. Some of the parallel lights I use for moonlight aren't giving off any light.

A. This is a known problem with parallel lights. For some reason in some arrangements you get no light at all. Just fiddle with it a bit - move it slightly, change the radii, move the vertex a bit - and it should suddenly work. Once you've got it working then it's stable. Likely the code chokes on certain values in its calculations. ... Also, to help optimize your moonlight, you should adjust the radius so it's only as big as it needs to be.

General Editing FAQ

Q. How do I attach a door handle to a door?

A. Just position the handle and input "bind" and the door entity ID/name as a spawnarg.

Q. How do I make sure a guard can unlock a door?

A. There are a few different ways, explained here [1]

Q. How do I make an object into loot?

A. Instructions are here [2]

Q. How do I make an entity frobable?

A. See the entry for Making an Entity frobable.

Q. How do I set up a put-object-here objective?

A. Instructions are here [3]

Q. How do I set up a "ghosting" objective (e.g., you are busted if you are seen.)

A. Instructions are here [4]

Q. What's a good way to make caves?

A. Some tips are here [5]

Q. How do I add music or ambient sounds? Q. Can I dynamically adjust the ambient lighting?

A. For both of these things, check out the article for Location Settings

Q. How do I get a lever or button to open a door?

A. Instructions are here [6]

Q. How do I put some text on a sign or wall?

A. You can use this method [7]

Q. How do I bind something to a rope (like a body) so it doesn't fall?

A. Dynamic ropes are unreliable, so it's good to use a func_static like a chain or make a func_static rope from a cylinder brush. For a ragdoll, place the ragdoll so he clips into the func_static. You need to bind the ragdoll to the chain (so the spawnarg is on the ragdoll), with "bind" "func_static_...", where func_static_... is the chain. Or, through DR, you can just select the entity you want to attach (the ragdoll), then also select the thing you want to attach it to (the chain), and in the menus select "Entity" - "Bind selected entities". But it's been reported the clipping does the job, not binding. See this link [8]


Q. How do I make something switch from frobable to unfrobable like a used lever (or vice versa, like contents in a chest or drawer you don't want prematurely frobable)?

A. Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property "start_frobable" 1 or 0 depending on your case (it affects everything inside), and a triggering entity targeting the set_frobable entity that triggers the switch.

Q. How do I make breakable glass?

A. Instructions are here [9]

Q. How do I make an object that you can frob and it does something?

A. If it's an object you made from patches or brushes, make it into a frobable func_static, or if it's already a func_static, make sure it's frobable (instructions are in an above FAQ). Then give it a Frob response whose effect is a trigger, and give it a "target" spawnarg to the entity that causes your effect when triggered.

Q. How do I mute an AI?

A. Give the AI the spawnarg: def_vocal_set atdm:ai_vocal_set_mute. If you only want to mute some barks, you'll have to modify the AI's .def file by hand, taking out the barks you don't want, and packaging the new def file in your mission's pk4. For coughing and animation based barks, see this post [10]

Q. Can I hide an AI until I trigger him?

A. No, hide doesn't work with AI. Use a teleport to teleport the AI in instead, or a teleporting script. (You need to check about starting him on a path after a teleport; there are issues with it. There's a post talking about this problem I'll try to find & link here.)