peter_spy 1538 Posted June 18, 2019 Report Share Posted June 18, 2019 I'm using the minimum value of lock_pins 0 and it's still a bit too long. Quote Misc. assets for TDM Link to post Share on other sites
joebarnin 245 Posted June 18, 2019 Report Share Posted June 18, 2019 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. Quote Link to post Share on other sites
joebarnin 245 Posted June 18, 2019 Report Share Posted June 18, 2019 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" 1 Quote Link to post Share on other sites
peter_spy 1538 Posted June 18, 2019 Report Share Posted June 18, 2019 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 Quote Misc. assets for TDM Link to post Share on other sites
JackFarmer 475 Posted June 21, 2019 Report Share Posted June 21, 2019 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 obj.txt Quote Link to post Share on other sites
stumpy 242 Posted June 22, 2019 Report Share Posted June 22, 2019 objective_ent 1 needs to be on both locations, and on the entity used to trigger is entity in location Quote Link to post Share on other sites
JackFarmer 475 Posted June 22, 2019 Report Share Posted June 22, 2019 Hello stumpy, "and on the entity used to trigger is entity in location" --> sorry, I do not understand, what does that mean? Quote Link to post Share on other sites
stumpy 242 Posted June 23, 2019 Report Share Posted June 23, 2019 needs to be on both locations and the door Quote Link to post Share on other sites
JackFarmer 475 Posted June 23, 2019 Report Share Posted June 23, 2019 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 Quote Link to post Share on other sites
stumpy 242 Posted June 23, 2019 Report Share Posted June 23, 2019 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. Quote Link to post Share on other sites
Guest objectives Posted June 24, 2019 Report Share Posted June 24, 2019 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. Quote Link to post Share on other sites
joebarnin 245 Posted June 24, 2019 Report Share Posted June 24, 2019 (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? Quote Link to post Share on other sites
demagogue 1252 Posted June 24, 2019 Author Report Share Posted June 24, 2019 Is it possible to delete it and spawn a new one at the new location? 1 Quote What do you see when you turn out the light? I can't tell you but I know that it's mine. Link to post Share on other sites
stumpy 242 Posted June 24, 2019 Report Share Posted June 24, 2019 (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 June 24, 2019 by stumpy Quote Link to post Share on other sites
joebarnin 245 Posted June 24, 2019 Report Share Posted June 24, 2019 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). Quote Link to post Share on other sites
stumpy 242 Posted June 25, 2019 Report Share Posted June 25, 2019 (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 June 25, 2019 by stumpy 1 Quote Link to post Share on other sites
JackFarmer 475 Posted June 28, 2019 Report Share Posted June 28, 2019 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. Quote Link to post Share on other sites
JackFarmer 475 Posted June 28, 2019 Report Share Posted June 28, 2019 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. Quote Link to post Share on other sites
JackFarmer 475 Posted June 30, 2019 Report Share Posted June 30, 2019 (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 June 30, 2019 by JackFarmer Quote Link to post Share on other sites
Springheel 4630 Posted June 30, 2019 Report Share Posted June 30, 2019 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. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
demagogue 1252 Posted July 1, 2019 Author Report Share Posted July 1, 2019 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. Quote What do you see when you turn out the light? I can't tell you but I know that it's mine. Link to post Share on other sites
Guest Dim Posted July 1, 2019 Report Share Posted July 1, 2019 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. Quote Link to post Share on other sites
joebarnin 245 Posted July 2, 2019 Report Share Posted July 2, 2019 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? Quote Link to post Share on other sites
VanishedOne 543 Posted July 3, 2019 Report Share Posted July 3, 2019 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. 1 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Dragofer 1355 Posted July 4, 2019 Report Share Posted July 4, 2019 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?) 2 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.