Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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.

 

Posted

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

Posted
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

Guest objectives
Posted

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. 

Posted

(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?

Posted

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.

Posted (edited)

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

Posted (edited)

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

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

Posted (edited)

 

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
Posted

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. 

Posted

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.

Posted

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.

 

Posted

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?

Posted

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

Posted
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

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...