Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


Recommended Posts

  • Replies 10.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

So I have this gigantic scorpion, it is made out of pendulums bound together. I had an idea about dragging whole thing through a piled up crates (pretending to be stone blocks in a wall), but it looks

I'm just going to make the lute player an undead immortal skeleton called Ralph who is eternally bound to play his lute in the tavern, the residents are used to him now so they just happily co-exist a

Thanks for the advice about the tent, guys. Finally got around to (mostly) fixing it; shadows were indeed the problem.    

Posted Images

In my test map I have a body of water that I want to hide and unhide via script. The water entity disappears when I toggle using hide() and find() but when I jump into the space where the water is that area still behaves as if the water is still there?

float water_state=1;

void hidewater()
{
if(water_state==1)
{
  $waterentity.hide();
 water_state=0;
}
else
{
$waterentity.show();
water_state=1;
}
}

Edited by hank morgan
Link to post
Share on other sites

I assume you require scripting for this but I could be wrong.. I want to try and create the following events for a map.

 

1) Player moves into a certain location

2) Player is unable to move

3) Screen fades to black

4) Some sounds are played

5) Text fades in and out on the screen for a short period of time

6) Player is teleported to a different location

7) Screen fades in and the player is able to move again

 

Does anyone know what the best way to make that happen is?

Link to post
Share on other sites

Pardon me as I use those requirements as an exercise before more knowledgeable folks contribute. I don't know about the text, but the rest can be done without scripting.

 

Obviously a trigger, teleport in walls to surround/obstruct the player, trigger_fade entity gets to black, speakers can be triggered readily.

 

Now the issue is the fade to black will obscure everything at that point, so you can't show anything else.

 

As such, teleport the player to a black room with no ambient light and fade back up to do whatever display (I know nothing about showing text other than the boxes used in the tutorial which doesn't sound like the style you'd like).

 

Do the fades again with final teleport between.

 

PS: trigger_fade goes to black by default, via "0 0 0 1", I've used that, I presume fading to "0 0 0 0" will remove the black by making it clear to fade from black as it were?

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to post
Share on other sites

Thanks RJ

 

Got it sorted :)

Edited by Goldwell
Link to post
Share on other sites

Just to shed light on a few things ...

 

Text can be displayed after fading the screen. (Examine the use of the entity named "EndMessage" in In the North's script and map.)

 

The player can be frozen by deploying a camera at his eye level, and with his angles.

 

Text can't be displayed when a camera is in use.

  • Like 1
Link to post
Share on other sites

There are lots of missions already with custom guis, like in heart of lone salvation:

at 2.37

You dont have to bind some patch to a camera or something like that, the gui works on the screen. To circumvent the fading method: You can make a black full screen gui and change its transparancy over time. Teleporting and immobilizing the player was also done at the beginning and end of requiem.

Link to post
Share on other sites

Is there a way to attach or detach props to an AI, or to fake it? So that the animations are properly replaced, I mean.

 

I see from the wiki (and from tests) that simply binding an object doesn't replace animations. Can I add or remove a def_attached torch using a script? I haven't managed to get

$myAI.showAttachment(string attName, float show);

to do anything noticeable. (I'm assuming attName should be something like "def_attach2").

 

Or failing that, can animations be replaced at runtime? I want the player to see the AI pick up something, so I can't simply swap out the AI with an object-carrying buddy from the blueroom.

 

EDIT: I discovered idActor.setReplacementAnim() a few mins after posting, which works. I copied the replacement anims from tdm_prop_items.def. The object is held wrongly but I guess that's solveable.

post-29566-0-62376900-1387312663_thumb.jpg

Edited by SteveL
Link to post
Share on other sites

You could do 2 custom anims with keyframes that

1) spawn an object into the AIs hand, and

2) destroys the object.

 

From tdm_ai_guard_proguard_devel.def:

anim relight_high   models/md5/chars/guards/proguard/relight_high.md5anim
{
	no_random_headturning
	frame 50	attach atdm:prop_steel steel hand_l
	frame 81	sound monster_demon_tick_footstep
	frame 96	sound monster_demon_tick_footstep
	frame 117	sound monster_demon_tick_footstep
	frame 117	fx fx/smallsparks1
	frame 117	object_call relightLight
	frame 167	destroy steel
}

 

Frame 50 attaches the item on AI and 167 removes it.

 

You could make a new amin that uses the use_righhand anim, but the new anim has a keyframe that attaches the object you want.

 

If you don't destroy the item when the anim ends, the ai keeps the item.

Clipper

-The mapper's best friend.

Link to post
Share on other sites

Thanks Sotha. I've been keeping an eye on your custom animations thread (great work btw, looking forward to seeing it in game!) but I've not done any and didn't realise you could tweak animations without using a complicated external editor, or that any part of the animation setup is stored in def files. That opens a few possibilities... I'll search through the defs and see if I can spot how they get the torch the right way up!

Link to post
Share on other sites

Hey,

 

Is there a quick way to darken a texture? I want to match marble, alabaster or whatever with some sculpted panels/shields, and it's either too bright or too dark.

I thought of creating a slightly dark homogeneous decal and use it over the marble.

Edited by Bastoc

Jared, is that you ?

Must be rats...

Link to post
Share on other sites

Which textures in particular and which ones are you trying to match with? names please.

 

FI stone/scupted/shields/ornament_shield_white_bendlets and any stone/flat/smooth with the right tone.

But I was using DR fullbright mode camera preview, so I guess it was with maximum gamma. In-game it's completely different. Noob...

I made a kind of palette to look in-game and I found stone/flat/smooth/marble_white_01 is a good match for the shields.

Problem solved for now! Thanks anyway.

Jared, is that you ?

Must be rats...

Link to post
Share on other sites

I'm try to implement something and I just can't figure out how to do it. When the player frobs a specific object (which also completes an objective), I want a guard to appear in a certain location on the map (the goal is to make it hard for the player to exit they way he came). What's the best way of doing this? I read up on stim/response and experimented a bit, but never got anything to work. I see the pieces (including a response the moves an entity to a specific location), I just can't put them together right. Any suggestions or a step-by-step would be greatly appreciated. Thanks.

Link to post
Share on other sites

1) put ai without any targets in your blueroom

2) make any kind of func_static

3) open func_static in stim&response editor

4) give it response "trigger"

5) give effect "teleport" and coordinates where you want the AI to appear. I get the coords by dragging the ai to the location and copying the origin from the entity inspector.

6) give effect "add target" givd the freshly telerported AI a path so they start patrolling

7) target the func_static with with a lever or anything to make all the stuff happen.

  • Like 1

Clipper

-The mapper's best friend.

Link to post
Share on other sites

Hey guys, just posting this question in here for future reference for once/if i get to mapping with DarkRadiant.

 

Is DarkRadiant similar to the Hammer Editor for the Source Engine at all? I have some skill in using that editor and id like to know if having knowledge in that editor for that engine would help me understand how to work with DarkRadiant.

Edited by MacD11
Link to post
Share on other sites

I made some maps for HL1 with Hammer and startet using DarkRadiant a few weeks ago. I think your knowledge will help you a lot. I startet this http://wiki.thedarkm...ide_Start_Here! and didn't need to finish the tutorial. Just start from the beginning and do exactly what's written, you'll find all important information on the first pages. Then I stopped the tutorial and looked up things when I stuck. For Example: I searched for a way to link to the textures as you have to in Hammer (if I remember right) but you dont need to do it in DarkRadiant.

Edited by Jasp
  • Like 1

$guard.moveToPosition($player1.getOrigin());

Link to post
Share on other sites

Any knowledge of other editing systems will have some applicability to new ones. My had a professional background with Lightwave years ago, and a completely different type of 3D in Second Life, both of which made picking things up here relatively faster than those with no prior experiences it seems. At the same time, prior knowledge also can set up false expectations you have to work around or "unlearn". But overall, it typically facilitates your progress. Give it a shot, you've got nothing to lose but enjoyable time spent!

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to post
Share on other sites

1) put ai without any targets in your blueroom

2) make any kind of func_static

3) open func_static in stim&response editor

4) give it response "trigger"

5) give effect "teleport" and coordinates where you want the AI to appear. I get the coords by dragging the ai to the location and copying the origin from the entity inspector.

6) give effect "add target" givd the freshly telerported AI a path so they start patrolling

7) target the func_static with with a lever or anything to make all the stuff happen.

 

Thanks! I got that to work with a lever, and with objectives (setting the Completion Target to be the func_static). So all is well.

Link to post
Share on other sites

Any advice on getting prefabs to line up with the grid? A lot of times when I import a prefab, it's off-grid, and if I try to snap to grid, it misaligns things all over the place.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...