Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

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.

 

Share this post


Link to post
Share on other sites

Oh wait, "0" in lock_pins actually means "10", which is the maximum. Try using "1" - that's the real minimum (1+5). It's a lot faster than "0"

  • Like 1

Share this post


Link to post
Share on other sites

Yeah, that is weird and counter-intuitive. "0" is almost 7 seconds, while "1" is 4 seconds.

 

According to wiki 0 is 0+5 and 5 is always added, so that part is wrong. http://wiki.thedarkmod.com/index.php?title=Doors#Lockpicks

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

objective_ent 1

needs to be on both locations, and on the entity used to trigger is entity in location

 

Share this post


Link to post
Share on other sites

Hello stumpy,

"and on the entity used to trigger is entity in location"

--> sorry, I do not understand, what does that mean?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

don't know whats wrong cant get it to work either.

it works in a old map I have where I have something similar, but not in the obj.map.

Share this post


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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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

  • Like 1

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

Share this post


Link to post
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

Share this post


Link to post
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).

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
On 6/24/2019 at 3:59 AM, Guest objectives said:

 

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

Thanks Jeff, that's a good idea.

Share this post


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

Share this post


Link to post
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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Guest Dim

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.

 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

AI have a stopMove() script event: it lacks a description on the wiki and the one here is a bit opaque, but it might be what you want.

 

  • Thanks 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
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

Share this post


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...