Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue
 Share

Recommended Posts

I'm not an expert, but looking at the code, I think 0 is the best you can do. As you mentioned, +5 gets added. There is a setting to override the +5, in darkmod.cfg

 

seta tdm_lp_base_count "5"

 

But in the code, if this value is less than 5, it looks like it gets set to 5. So, at least by my reading of the code, setting it less than 5 doesn't do anything. But you can try it and see if it works.

 

Link to comment
Share on other sites

I have an entity (sliding door) that can travel between to objective locations.

If the entity is in the first location (open), the relevant objective shall be completed and a completion target shall fire (in this case, a changetarget entity).

If the entitiy is in the second location (closed), then the referring objective for this status shall be completed (again with a completion target).

The problem is, I do not get the objectives working. I looked into "Requiem" and copied the settings perfectly, but it does not work.

I have attached an example map below. Could somebody be so kind and have a look? I don't understand why it is not working.

 

Jack

objectives.jpg

obj.txt

Link to comment
Share on other sites

5 hours ago, stumpy said:

needs to be on both locations and the door

But that's what I did:

- gave the objective location "open" the property "objective_ent - 1"

- gave the objective location "closed" the propery "objective_ent - 1"

- gave the door entity (hammer) the property "objective_ent - 1"

 

...but nothing happens, see attached demo. :(

obj.test

Link to comment
Share on other sites

Guest objectives

I too have recently been having troubles with "Item is in location" objectives. I got frustrated and put it aside for a few days. When I came back, it was working, so I don't know what got it going. Jack, your test case is very simple - it should work. I don't see any obvious issues.

A possible work-around is to use the "Two entities are within a radius of each other" objective. That seems to work pretty consistently. 

Link to comment
Share on other sites

(the previous post was me too).

I'm trying to move a light using a script call (e.g., $myLight.setOrigin(newLocation)). Works fine for most lights, but for candles in holders (for example, atdm:moveable_holder_round_plus_candle) it moves the holder, but not the candle itself. Probably something to do with the fact that atdm:moveable_holder_round_plus_candle entity has a "def_attach" of the candle itself (atdm:moveable_candle_default) - the def_attach'ed candle is what isn't getting moved by the setOrigin call.

Has anyone run into this before? Any ideas?

Link to comment
Share on other sites

I also tried the player1 in location objective which you use to finish a map at the end when all other objectives are complete, and that wasn't working either.

I also thought it might be the texture, cause the clip texture is usually used for item in location on the location entity as its invisible in game.

I also tried a custom object in case it was a problem with the door entity, but nothing worked.

I also thought it might be there's no actual info_location for the room there so I put one in and that didn't fix it.

Edited by stumpy
Link to comment
Share on other sites

20 hours ago, demagogue said:

Is it possible to delete it and spawn a new one at the new location?

Yes, that would work. The problem is, what if the player extinguished the candle before the script moved it? Spawning a new one will relight it. I can't tell if there are script calls to determine if a light is extinguished (in which case I could spawn it either lit or extinguished).

Link to comment
Share on other sites

not sure if this works on a lit candle in a holder, or whether it still actually works at all.

light_moving_ext lightObj = $<name of flame>;

if (!lightObj) //if light lit

{

return

}

else

{

lightObj.frob_ignite(); //turns flame particle effect on

$<name of flame>.On(); //turns light on

}

 

its lightobj.frob_extinguish(); to turn off a flame via a script

and $<name of flame>.Off(); to turn the light off.

I had it on a forge that you could turn on and off but sometimes the flame particale effect appears and the light stays off, or the light comes on and the flame doesn't appear.
           

Edited by stumpy
  • Thanks 1
Link to comment
Share on other sites

On 6/24/2019 at 5:00 PM, stumpy said:

I also tried the player1 in location objective which you use to finish a map at the end when all other objectives are complete, and that wasn't working either.

I also thought it might be the texture, cause the clip texture is usually used for item in location on the location entity as its invisible in game.

I also tried a custom object in case it was a problem with the door entity, but nothing worked.

I also thought it might be there's no actual info_location for the room there so I put one in and that didn't fix it.

This is really strange, I have an already integrated objective where you have to drop a person in a certain location, and this works without problems.

Anyways, thanks, stumpy for your efforts.

Link to comment
Share on other sites

 

I have a problem with adding a final narrator comment at the very end of the mission.

Once every objective has been cleared, the narrator shall give a final statement.

How do I do that?

I have tried adding an objective where I simply included the "Enabling Objects", added the restriction "two items are within a certain radius" with the following:

 

- created a info location the size of the map (A)

- for entity I have added "idPlayer"

- for info location I have added A

- then I included a very large distance

 

....but nothing happesn.

How can I do that? And how can I make sure, that there is a certain delay before the final comment starts?

 

Edited by JackFarmer
Link to comment
Share on other sites

I haven't used the objective editor in a long time, but you can use it to trigger entities once an objective is complete--just trigger a speaker from that objective. 

Link to comment
Share on other sites

You might be able to do a kind of relay trigger to get your pause and then the final end (you can have the final, final objective to be a hidden one triggered after the speech is over). But personally I'd just have that objective call a script and do it all by script, then there's no relay business. You just directly add the commands to the script: the pause, then activate the speaker, then pause while it speaks, then trigger the final hidden objective directly. And you can find the commands either in the wiki, in other example scripts, or it's basically C++ so look up the C++ way and it will probably work.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

A very simple method i have used before,  a trigger brush attached to speaker on a delay/wait, player enters trigger brush/chosen area, 30/60/XX seconds later, audio plays? Or you could add a play audio command to last objective script.

 

Link to comment
Share on other sites

How do you get an AI to stop patrolling? I'm writing some script code, and one of the things I want to do is stop a patrol. I just can't see how to do it. I tried removing all of the path_ entities, but that just crashed DM. What am I missing?

Link to comment
Share on other sites

On 7/2/2019 at 11:46 PM, joebarnin said:

How do you get an AI to stop patrolling? I'm writing some script code, and one of the things I want to do is stop a patrol. I just can't see how to do it. I tried removing all of the path_ entities, but that just crashed DM. What am I missing?

This is something I used for a custom AI script in an early alternate version of Down by the Riverside (Tales of the Riverside), which you can find [url=http://forums.thedarkmod.com/index.php?/topic/18402-fan-mission-down-by-the-riverside-by-dragofer-20160925/&do=findComment&comment=407828]here[/url].

The script is able to make an AI stop patrolling upon reaching its next path node. If you want the AI to stop immediately it would involve teleporting the path_corner to an inaccessible location, as I recall it.

(I was aware of the StopMove event but in my experience it only caused the AI to twitch while carrying on with its patrol. Might be good for a free-roaming AI like a zombie though?)

 

  • Like 2
  • Thanks 1
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.

 Share


  • Recent Status Updates

    • duzenko

      Please, can we finally group the missions by year in the game menu?
      · 3 replies
    • duzenko

      I vaguely recall someone recently complained about two-sided materials (curtains?) not getting lighting from both sides
      I just found a piece of code that's supposed to do just that
      Where was that discussed? (@nbohr1more?)
      · 8 replies
    • Xolvix

      I still play classic Doom (albeit with user-made mods and maps rather than the original campaign) on a regular basis. A game from the early 90's which has still got a healthy following in 2022. Pretty amazing.
      · 3 replies
    • Nort

      I'm beginning to understand why people who aren't into social clubbing "don't last long" on this project, and why it's so full of holes. When moderators are siding with bullies, by closing down threads that they derail, then I start to wonder if I should support the platform to begin with.
      I'm sure that the core development is solid, but when you're constantly tone policed and bullied, and moderators are playing into it too, then the project will just drive away talent, and replace it with socialites instead. ...and without talent, you only end up with a small skeleton crew trying to do everything themselves.
      ...so Dragofer and Airship Ballet, and all you other socialites, you win. From now on I'll just keep to myself. You'll never be able to do my work, but at least you'll be happy together, and that's what matters to you.
       
      Update
      Actually, I have to revise my statement:
      I actually messaged greebo - the top dog, I gather - about nbohr1more's outburst of insanity below, and since I haven't even heard back from him, I just have to assume that there's not a single core programmer here, who's not backing nbohr's threats. ...and that's bad.
      ...so if you're a newbie reading this, or an honest soul like ZergRush, then just slowly back out of these forums, run, and don't look back. This is nothing more than a cult posing as a game development project, using Thief and IDTech4 to sucker hopefuls in, to do work for them, while trying to cajole them into something going on behind the scenes, which apparently - according to nbohr - is something that should be hidden from the state. These people aren't programmers - they don't even understand things like how to fix the simplest bugs. All they have, is an engine, and an IP, and some sort of fascist social cult. There was some other project I saw being made in the Unreal Engine. Try joining that project. ...or start a project of your own. Anything but this asylum.
      Hopefully that was "divisive" enough for a final post, because at this point I really want people to leave this place. This project is, on a management level, just awful garbage, run by garbage people, apparently from the top down, and I'm just glad that they have a garbage place to stay, together, and hopefully forever.
      Nort
      · 8 replies
    • The Black Arrow  »  Araneidae

      A spidey! I love spideys 🕷️
      · 0 replies
×
×
  • Create New...