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

    • Nort

      While I did find Springheel's brushwork pretty questionable, I guess engine performance must also have come a long way during the recent five years, because I can safely say that the kind of performance issues that he's talking about in this video, just didn't happen to me when I fully opened up my basement with all its unoptimized brushwork. The framerate was capped at a nice 60 FPS no matter how I tried, and with visportals on top of this, and the complexities turned into "func_static":s, an uncapped framerate would just be obscene, at least for graphics cards only a few years old. I no longer have any worries about large areas and vistas - I'll just go nuts. It's gonna be fine.
      · 18 replies
    • irg

      Every day is just like the 4 Non Blondes song. What IS going on?
      · 0 replies
    • Nort

      Map Status Updates
      This status update will be continuously updated (via replies) to contain all the daily progress I make on my map. This will avoid spamming the Status Update list.
      · 1 reply
    • Nort

      I did it! I finally did it! After 48 hours of frustration and confusion, I managed to finally sort out how to attach equipment to NPC:s properly, and write down coherent instructions on how to do it, both in my manual, and in this forum.
      I can finally rest. I can finally eat breakfast.
      · 0 replies
    • Nort

      Spent most of the day learning and writing about AI navigation. It's stuff I already know, but the magic about writing something down as clearly formulated as possible, is that you then see things that much more clearly. You also find what's unclear to you, and then you figure out exactly how things work. I was hoping to get through it all within just a day, but it looks like this will take tomorrow as well, at this rate. There's also plenty of other nonsense I have to get through as well. Everything's a chore.
      · 0 replies
×
×
  • Create New...