Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

7 hours ago, STRUNK said:

@Destined

Ok, the spawnarg is clear now, but I don't really understand what the benefit is over setting this value via a stim/response, instead of in the entity window. Do you have an example in what scenario this would be applicable?

The frob action made the door open and close a little bit for like 10 times in a short time .. it was ratteling and stayed closed. To trigger a door to open I would use triggers anyway, but this was a testing setup. I found that the frobable response did work on the same door, and I could make it un-frobable.

I tried the same door model, but the reversed one and copied the whole path .. and tried the same size model wita different skin ... didn't try other models.

I Would like the light to change color, but the Set Light Color response doesn't work on the model, but does work on a light source. Something that is probably obvious for people who understand it all : )

I got to understand triggers. They are simple blocks but you can make complex things happen with them, because there is a lot of types with different functions. But I still do not understand why/how the Trap 1 works ... why does the touching of the entity with te responses defined, the tile, trigger these responses when it touches the stem/trigger? What is the relationship between the stem/trigger and the falling tile?

How to make a light turn of by shooting a fire arrow at something else .. for example?

 

 

For the spawnarg I am not sure what the application was. I am sure I had one some time ago, but I cannot remember what it was ?

The door scenario sounds like the door somehow got further frob stims right after the response. Did you also define a stim with frob besides the response frob? This would cause the door to emit a frob stim itself and consequently activate itself. This is the only thing that I could think of from the top of my head.
Making stuff unfrobable is very handy for anything that you want to be triggered once and prevent the player from frobbing again. It may also work on the door, if it gets multiple frob stims: As the first response, make it unfrobable, in the second line, do what you want, and in the third line make it frobable again.

Not sure what you meant by "reversed one", but it could be that there is troble with the origin. I am pretty sure the new model uses the same values for the origin, so if the new door has its origin on the right, while the first one had it on the left, the new door would appear in the wall, which would be why you cannot see it. you could test this by putting the door not inside a frame, but somewhere in the middle of a room. When you want to use the same model with a different skin, it would be better to use the Set Skin response. That's what it is there for.

The grill light should be a light source that simply has a model defined, which lights you add with "Create Light..." do not. If the colour of the light changes, but not the colour of the model, I presume that the material of the light would have to be updated. I am not sure how often stuff like colour is checked, but I presume it is each time the model gets rendered, so apart from changing colour you would have TDM to update the material render. I think there is a console command, that lets you reload materials, but I could not find it right away. You could try to give the light the response Set Skin and use the skin it already has. This might cause TDM to reload the skin it has and update the colour, but I am not sure if this works.

Regarding the traps, I will have to take a look at the video again; maybe I will get to it this weekend.

For your last question, it should work by giving the entity that you want to be shot to turn off the light the response type "fire" (you can select it from the dropdown menu) and the response effect "Turn (extinguishable) Light Off" with the "Target Light" being the light you want to turn off. Now, as soon as anything with a fire stim (which fire arrows have, but as written before the slow match or candles, as well) gets near the entity with the response, the light should be turned off. The same works for the response type water and water arrows etc. You always have two pairs: one entity that gives you a response to a stim and an entity that emits the stim. With frob the player emits the frob stim, when you hit the frob key. For others you need to find an entity that emits the respective stim.
A side note here: entities other than AI and the player do not receive damage. Thus, it is not possible to give a random entity the damage response and create an effect, when it is hit with the sword or an arrow. This is something I spent some time in trying to get it to work, until I was told that it is not possible.

  • Thanks 1
Link to comment
Share on other sites

@STRUNK the tile trap's mechanism is that the tile starts the map slightly above the ground with its physics disabled (nodrop is set to 1). As soon as anything touches the tile, its physics get enabled and it drops to the ground, where it comes close enough to an invisible entity to trigger a stim/response effect.

Setting the colour on a lamp model should only affect the model, but not any lights that have been attached to it via def_attach. The model should only be affected if it has a colorme texture on it (recolourable), though IIRC the only actually working way to change the colour of a model is to use a colorFade script command (see Down by the Riverside for examples). Btw, I've always wondered how to target a def_attached entity in this game - anyone know the syntax for this?

For the fire arrow effect you described you'd have to add a response to fire stims on the target that gets hit by the arrow, with an effect to turn the light off.

  • Thanks 1
Link to comment
Share on other sites

In case of the grill lamp, it is actually a light entity with a model, not a model with a def_attached light. It also has a colorme skin by default. Hence, my assumption that it has to be rerendered.

Here is a snippet from the "Attach Props to AI" Wiki page, which def_attaches a key to a guard an then changes some properties:

"def_attach6" "atdm:prop_silverkey"
"pos_attach6" "belt_back_right"
"name_attach6" "gate_key"
"set inv_name on gate_key" "gate key"
"set name on gate_key" "gate_key"

This should also work for other def_attached entities.

  • Like 1
Link to comment
Share on other sites

Ah, then a color fade script should work on that.

Thanks Destined for sharing that, though what I actually meant was how to point to a def_attached entity in a script command or S/R window.

Something like $guard(key).trigger(); for example?

Link to comment
Share on other sites

Shouldn't this simply work by using the name given via "name_attach#"? So, in the case above use the first three lines and then e.g. $gate_key.trigger(). I mean, it is an entity with a specific name in the map, so it should not be different to other entities that you target via their name. The only problem I could see is if there are multiple entities with the same name_attach line. In that case, I assume the def_attached entities will be numbered and the script would only target the first that was created with the def_attach, because it would be the only one with that name. However, this is more guessing based on my understanding...

Link to comment
Share on other sites

22 hours ago, Dragofer said:

Another idea is to adapt a script fragment from Obsttorte to fade the fog's density over time as the player changes between locations. But it doesn't seem like fog entities respond to their shaderParm3 getting changed, unfortunately, so this wouldn't work. Had a test map where I just flat out called $fog.setShaderParm(3,10000); on a dense foglight.


void fade_fog(entity location_name)		//reduces the density of a foglight with the name 'fog' by increasing shaderParm3 when entering a location with the name 'location_name'
{
    float i;
    for (i=0;i<100;i++)				//for the next 100 frames (i = iteration)...
    {
        $fog.setShaderParm(3,1000+(i*10));	//add 10 to shaderParm3, from a starting value of 1000
        sys.waitFrame();			//repeat next frame
    }
}

//this is a start - would require variants to increase & reduce density and be called by moving to specific locations                       
                     

 

It just occurred to me: did your test map use delta1_fog by any chance? It has alpha explicitly set to 0.5 (values of 1 or less are treated as an instruction to use a 'default' fog distance of 500 units), which might explain why the shaderparm wasn't working.

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

@Destined

I made a brush, made that func_statik and gave it the fire stim and gave it the fire response with the effect "Turn Light Of" .. and that works!

I thought I had to have the stim and response on a different entity ... Now I got this trap working and this fire response, I'm gonna fiddle around with it some more and when I understand it better, I'm gonna read your comments again and hopfully understand more about the functionality.

Link to comment
Share on other sites

Fixed my problem with Briarwod Manor, mission is now updated.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I'm having some difficulty with the following:

I'd like the player to select an available inventory weapon (e.g., sword), and, once it's loaded, realize that's something's wrong with it (I'm imagining conveying this through a popup message here.. no problem with that). Then the weapon would be automatically put back away. The forum+wiki has some hints about various ways to do something similar to that last step, but I couldn't quite grasp their details and how to deploy them. The best I could do was build a frob script [attached; placed in the maps folder] for the weapon, a sword in this case. It fires OK, but my "endless" loop to detect current-weapon only runs a few times then stops. (And it would be better not to have an endless polling loop at all, instead have some response to the weapon-raised event.)

Thanks.

sword_stop.script

Link to comment
Share on other sites

I finally made things work with the stim/response editor. Making things happen with certain arrows, frob, and Springheels Trap1.

I got a video showing what's happening, and a mapfile with the setup.

https://streamable.com/0y3ww

https://filebin.net/zhglkx6g8wh5nts5

Select a white block and go to the entity menu, there select stim/response to see what is set/how it works.

I couldn't get the Move To Position effect to work ... it's on the moss block. Anyone have a clue why?

 

Edited by STRUNK
Link to comment
Share on other sites

Nice work! I like the elements theme (kinda reminds me of The Fitfth Element). Not 100% sure about the Move To Position effect, but I could imagine that this only works with moveable entities. If you just want to have the block in another location, try the Teleport (Set Origin) effect instead.

  • Thanks 1
Link to comment
Share on other sites

@Destined

"Not 100% sure about the Move To Position effect, but I could imagine that this only works with moveable entities. If you just want to have the block in another location, try the Teleport (Set Origin) effect instead."

That could well be the case, I'm gonna try it. Thanks.

---

The Teleport works, but the Move To Position doesn't work on movables either ...

Also 2 particles spawn at the frob block and I would like them to be removed when the rope arrow is taken, but there is only a Remove effect, where you can't select a particle : (  There should be a Remove Particle to make things more complete on the effects side, I think.

 

Edited by STRUNK
Link to comment
Share on other sites

It looks as though Move To Position is for use with AI.

The response effects are implemented via script functions, so you can find out what they do internally by looking at script/tdm_response_effects.script inside tdm_base01.pk4. effect_move_to_position_action() appears to invoke a script event called moveToPosition(), which according to http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference/2.06 is specific to the idAI spawnclass. (A touch confusingly, idMover has one called moveToPos().)

Edit: on removing particles, I'm guessing these ones were spawned via the Spawn Particle effect? From a glance at the scripting there's no obvious way to get the name of the emitter it spawns, so depending on what you want to do, the best thing might be to place your own func_emitter and trigger it on/off as desired.

Edited by VanishedOne
  • Thanks 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

4 hours ago, Destined said:

(kinda reminds me of The Fitfth Element)

The first thing that went through my head when I went in there during beta was “Aziz! LIGHT!!” Haha

As my father used to say, "A grenade a day, keeps the enemy at bay!"

My one FM so far: Paying the Bills: 0 - Moving Day

Link to comment
Share on other sites

@VanishedOne

A func_emitter is an entity and can be triggered with a Trigger effect, and also be removed with a Remove effect, so that would certainly work. The only thing is; how to get this done by a frob stim on the arrow .. for the arrow is spawned with the Spawn Entity effect. If I hide the arrow and Teleport it to that place, hanging in the air, it drops down and starts acting weird ...

I guess I have to make a little caulk block where the arrow sticks into a bit, after the teleport, so then I can put a stim/response on it to make the func emitters to be Removed.

If the Move To Position effect is for AI it's description might not be right: " Move To Position: Moves the named Entity to the stated Position (coordinates: X Y Z). http://wiki.thedarkmod.com/index.php?title=Stim/Response_Editor

----

I did make it work with the func_emitters and the caulk "holder" block and I was wondering: Is there a way to make the particle fx fade away, instead of beïng just gone? For aesthetics that would really be a lot nicer.

The ea001_bloom particles don't react on the start_off spawnarg by the way, but the roverbeam3 does.

Is it allowed to upoad .map files via the " Drag files here to attach, or choose files... "  .. or better via weblinks like I did earliër?


 

 

 

Edited by STRUNK
Link to comment
Share on other sites

Is there a way to display atdm:gui_message while a camera is active? I can use a semitransparent screen attached to camera but it requires actual texture for every text block, so message would be much more versatile and easy to modify. 'cinematic' '1' don't work.

S2wtMNl.gif

Link to comment
Share on other sites

@Grantolandon

You might be able to make things happen by adding the spawnarg "frob_distance" "50" to the door. If I remember correctly it's default is "100", so both the readable and the door have the same "frob_distance" now. By making the "frob_distance" of the door shorter, like "50" or something (play around), the readable would be frobbable from a further distance then the door.

  • Thanks 1
Link to comment
Share on other sites

How to get custom sound effects in my map?

I want to have an oldschool doorbell, but there is no sfx for that. I found one of my liking online, added a folder sound, in there the folder sfx, and in there doorbell.ogg ... but doesn't get it to the editor ...

I probably have to make an other file to get that done ... but ofcourse I don't now what and how : )

======== SOLVED ===========

Ok .. I got it figured out by looking at other fms. (braeden_church)

In the sounds folder I put a file "mill.sndshd" (where mill is the worktitle of my mission) (make it in notepad and replace the .txt extention with .sndshd) with the following "code"

//=================================================
// doorbell
//=================================================

doorbell
{
    sound/sfx/doors/doorbell.ogg
}

 

I added the audiofile .. maybe someone might like to use it. Sounds like a table bell also.

Edited by STRUNK
Link to comment
Share on other sites

2 hours ago, Gantolandon said:

Is there a way to make a readable actually frobbable when attached to the door? It seems that if they are close enough, it is impossible to actually frob the readable. The door will eat the frob instead, even though the readable is closer and the user looks at it directly.

Don't know if the TDM frob is based on a trace but if it is, you could try turning on (g_showCollisionModels 1) and make sure the collision box of the readeble is not inside the door collision box. You can do the same on the editor by displaying the collision proxies (green texture with collision text on it) and fix it there.

  • Thanks 1
Link to comment
Share on other sites

Hey quick question, how do you get a camera position to be rendered in real time to a material surface? Wanting to create a neat effect but I'm having a hard time tracking down documentation on the matter.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

On 10/19/2019 at 4:48 PM, Gantolandon said:

Is there a way to make a readable actually frobbable when attached to the door? It seems that if they are close enough, it is impossible to actually frob the readable. The door will eat the frob instead, even though the readable is closer and the user looks at it directly.

Check the map file of "HH:VF" - the front door includes a note with a frobbooster.

Link to comment
Share on other sites

Ahhh my bad, I thought the camera tutorial was just for the one that buzzes the alarm if it spots something. Yeah that looks to be the reference material I was needing. Just kinda wanting to reverse engineer some template so I think this will work.

Modeler galore & co-authors literally everything

 

 

Link to comment
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.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...