MirceaKitsune 249 Posted October 30, 2020 Report Share Posted October 30, 2020 Having a few issues with pesky assets I can't locate in the browser. Where do I find: The telescope model. I know there was a large one you could put on the ground. A denser moving cloud texture, ideally one that looks good lit by the moon. A song for the lute player. Despite all the trouble I went through with him, I didn't yet find a guitar to put on his speaker. Quote Link to post Share on other sites
STRUNK 270 Posted October 30, 2020 Report Share Posted October 30, 2020 @MirceaKitsune Download LuteMusic Put the music folder with the wav and the LuteMusic.sndshd in your sound folder. If you don't have a sound folder yet, make one : ) Quote Link to post Share on other sites
MirceaKitsune 249 Posted October 30, 2020 Report Share Posted October 30, 2020 So there is no good one by default? I'll get one from OGA then. What about the other assets? Also I can't find the property to make a piece of loot noticed by the AI when it's stolen. How do I make guards see when a large painting was ripped off its frame? Quote Link to post Share on other sites
joebarnin 245 Posted October 30, 2020 Report Share Posted October 30, 2020 1 hour ago, MirceaKitsune said: Also I can't find the property to make a piece of loot noticed by the AI when it's stolen. How do I make guards see when a large painting was ripped off its frame? Take a look at this: https://wiki.thedarkmod.com/index.php?title=Alert_%26_Suspicion_Triggers#Missing_or_Moved_Objects.2C_Absence_Markers 1 Quote Link to post Share on other sites
grayman 2968 Posted October 30, 2020 Report Share Posted October 30, 2020 3 hours ago, MirceaKitsune said: So there is no good one by default? I'll get one from OGA then. What about the other assets? Are you talking about the spyglass? The model for the loot version is at spyglass/fancy. Another is at player_equipment/spyglass. Quote Link to post Share on other sites
MirceaKitsune 249 Posted October 30, 2020 Report Share Posted October 30, 2020 1 hour ago, grayman said: Are you talking about the spyglass? The model for the loot version is at spyglass/fancy. Another is at player_equipment/spyglass. Was talking about a song for the lute player. I'm not looking for a spyglass but the telescope, the large one. Quote Link to post Share on other sites
STRUNK 270 Posted October 30, 2020 Report Share Posted October 30, 2020 (edited) For hours now I'm trying to find out how to get a predefined value in ::init to be "known" in an other part of the script. Been looking at other scrips and don't understand what I'm doing wrong. I'm just trying to sys.println() a predefined number to see if what I'm doing works ... but I can't even do that : D #ifndef __REUSABLE_SCRIPT__ #define __REUSABLE_SCRIPT__ object poltergeist_script { float clicks; void init(); void OnOff(); }; //init void poltergeist_script::init() { ResponseAdd(STIM_TRIGGER); ResponseSetAction(STIM_TRIGGER,"OnOff"); ResponseEnable(STIM_TRIGGER,1); clicks = 2; } //OnOff void poltergeist_script::OnOff() { sys.println(clicks); } #endif __REUSABLE_SCRIPT__ Whatever number I put in void poltergeist_script::init() / clicks , I keep getting 0 in the console : ( Edited October 30, 2020 by STRUNK Quote Link to post Share on other sites
grayman 2968 Posted October 30, 2020 Report Share Posted October 30, 2020 2 hours ago, MirceaKitsune said: Was talking about a song for the lute player. I'm not looking for a spyglass but the telescope, the large one. I found a telescope in The Accountant 2. It's not a TDM asset, so ask Goldwell about borrowing it? Quote Link to post Share on other sites
HMart 318 Posted October 30, 2020 Report Share Posted October 30, 2020 (edited) 19 hours ago, STRUNK said: For hours now I'm trying to find out how to get a predefined value in ::init to be "known" in an other part of the script. Been looking at other scrips and don't understand what I'm doing wrong. I'm just trying to sys.println() a predefined number to see if what I'm doing works ... but I can't even do that : D #ifndef __REUSABLE_SCRIPT__ #define __REUSABLE_SCRIPT__ object poltergeist_script { float clicks; void init(); void OnOff(); }; //init void poltergeist_script::init() { ResponseAdd(STIM_TRIGGER); ResponseSetAction(STIM_TRIGGER,"OnOff"); ResponseEnable(STIM_TRIGGER,1); clicks = 2; } //OnOff void poltergeist_script::OnOff() { sys.println(clicks); } #endif __REUSABLE_SCRIPT__ Whatever number I put in void poltergeist_script::init() / clicks , I keep getting 0 in the console : ( I don't script for ages but I don't remember the println function being able to printing floats directly?! I think the right code is this: sys.println("Clicks are: " + clicks ) ; edit: I'm dumb I went to see some old scripts of mine and yes you can print floats directly (by directly I mean you don't need to convert them to a string), it seems the println func needs a string also defined to work well? I updated my example script code, it was also badly formatted, like I said I don't doom script for ages... Edited October 31, 2020 by HMart Quote Link to post Share on other sites
Dragofer 1352 Posted October 31, 2020 Report Share Posted October 31, 2020 12 hours ago, STRUNK said: Whatever number I put in void poltergeist_script::init() / clicks , I keep getting 0 in the console : ( This is actually a bug with scriptobjects which set up their own S/R the way you've done in your init. I was stumped on this for ages, wondering why the variables don't carry over between functions (always 0), until it occurred to me to use a different method to call the script object i.e. via the frob_action_script spawnarg. 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
STRUNK 270 Posted October 31, 2020 Report Share Posted October 31, 2020 @Dragofer Dear lord : D I am referencing all kinds of scripts, including the func_mover_dragofer and going completely mad here because whatever I do, it's always zero. Thanks, I'm going to check out how to do that : ) Quote Link to post Share on other sites
STRUNK 270 Posted October 31, 2020 Report Share Posted October 31, 2020 (edited) @Dragofer It works now I copied things from the custom_func.def. This is really very strange as when I look to the .defs for @VanishedOne's triggers, they are set up as what I had .. and they do work. Maybe it's only buggy in the reuseable script. I also tried to give my script an other name, but that didn't work either .. although the wiki says it should work ... see "Discovery (or, why is TDM ignoring my script file?)" https://wiki.thedarkmod.com/index.php?title=Scripting_basics Is that also a bug, or did I just do something wrong and should it work? Edited October 31, 2020 by STRUNK Quote Link to post Share on other sites
VanishedOne 543 Posted October 31, 2020 Report Share Posted October 31, 2020 Comparing my script to the one above, the only thing that stands out is that my equivalents to OnOff() seem to have parameters, e.g. void TriggerNextInSequence(entity me, float threadnum); If anyone likes this telescope (CC-BY-NC), I've already done the format conversion for TDM. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
VanishedOne 543 Posted October 31, 2020 Report Share Posted October 31, 2020 (edited) On 10/29/2020 at 9:34 PM, MirceaKitsune said: At this stage I need help with one more spooky effect: I want to make a particle blood spawner, pretty much an entity that constantly leaks blood once triggered. If possible I'd like the particles to spawn decals on surfaces they touch so they get stained with blood from the fountain, as happens when you hit an AI with the sword or an arrow. Is there a default particle entity for that? The most id-like way is probably via the FX system. You can access it via func_fx. However, the decal splat range will be limited to < 8 units and the decal will only splat directly downwards. (The usual story: id set it up for the demon-spawning effects in D3 and didn't make it a conveniently general system because they didn't need to.) The other way would involve some sort of synchronised particle emitter and func_splat. However, I have a vague recollection that in my tests func_splat didn't splat all entity classes; splatting $world should work, anything else needs testing. (Also it seemed to ignore decalInfo and impose its own decal fade time.) After that you're in the territory of esoteric work-arounds like launching a custom projectile from an atdm:func_shooter. Edited October 31, 2020 by VanishedOne Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Obsttorte 1498 Posted October 31, 2020 Report Share Posted October 31, 2020 20 hours ago, STRUNK said: For hours now I'm trying to find out how to get a predefined value in ::init to be "known" in an other part of the script. Been looking at other scrips and don't understand what I'm doing wrong. I'm just trying to sys.println() a predefined number to see if what I'm doing works ... but I can't even do that : D #ifndef __REUSABLE_SCRIPT__ #define __REUSABLE_SCRIPT__ object poltergeist_script { float clicks; void init(); void OnOff(); }; //init void poltergeist_script::init() { ResponseAdd(STIM_TRIGGER); ResponseSetAction(STIM_TRIGGER,"OnOff"); ResponseEnable(STIM_TRIGGER,1); clicks = 2; } //OnOff void poltergeist_script::OnOff() { sys.println(clicks); } #endif __REUSABLE_SCRIPT__ Whatever number I put in void poltergeist_script::init() / clicks , I keep getting 0 in the console : ( As VanishedOne already pointed out I think the issue is that your response function "OnOff" does not have any arguments. My interpretation, as the script gets performed anyway, is that the script compiler considers the function to be of "global" scale (in a sense as independent as to what entity it is called on) and ignores the value of the member variable clicks. Note that this variable is defined for all entities of type poltergeist_script, but the compiler can't know that it also has the same value for all of those entities. I can't say, though, why the code behaves like that. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild WIP's: Several. Although after playing Thief 4 I really wanna make a city mission. Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter Link to post Share on other sites
STRUNK 270 Posted October 31, 2020 Report Share Posted October 31, 2020 I want to give a spawned object the name of the trigger I'm making + something, to make it unique. The name of the trigger is "trigger_poltergeist_1" and the name of the spawned object should be "trigger_polergeist_1_light". So when I have more then one of these triggers it would be "trigger_poltergeist_2_light" etc. How can I do that? Quote Link to post Share on other sites
MirceaKitsune 249 Posted October 31, 2020 Report Share Posted October 31, 2020 Another simple one I forgot to ask: How do I make a readable note appear in the player's inventory at map start? Quote Link to post Share on other sites
Obsttorte 1498 Posted October 31, 2020 Report Share Posted October 31, 2020 56 minutes ago, STRUNK said: I want to give a spawned object the name of the trigger I'm making + something, to make it unique. The name of the trigger is "trigger_poltergeist_1" and the name of the spawned object should be "trigger_polergeist_1_light". So when I have more then one of these triggers it would be "trigger_poltergeist_2_light" etc. How can I do that? You can change the name via the function setName(string newName). getName() returns the name of the entity. So if the trigger entity is the spawning entity the code would look like this [code] entity myEntity = sys.spawn(entityToSpawn); //pass the proper entity def as argument myEntity.setName(getName()); [/code] If the trigger is not the spawning entity but only initiates the spawn (via a global script call or a custom entity) you have to pass the trigger entity (or at least its name) to the function where the spawn is handled. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild WIP's: Several. Although after playing Thief 4 I really wanna make a city mission. Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter Link to post Share on other sites
STRUNK 270 Posted October 31, 2020 Report Share Posted October 31, 2020 @Obsttorte Ok thanx, did that, now I want to look if it works/print the new name. But this doesn't work: entity light = sys.spawn("light"); light.setName(getName()); sys.println(light); An other thing, it's also spawning a trigger hurt and I want mappers to give it a hurt value from the triggers spawnargs, only the value must be "damage_triggerhurt_x" (where x is a number) for the trigger_hurt to understand it, and I want mappers to only fill in the number, so I have to combine the key value (0 to 1000) with "trigger_hurt_" and make that into one variable/string. How to do that? Quote Link to post Share on other sites
STRUNK 270 Posted October 31, 2020 Report Share Posted October 31, 2020 @Obsttorte I get an error: Multiple entities named 'trigger_poltergeist_1' .. so that doesn't work. The spawned entity get's the same name as the trigger itself : P Quote Link to post Share on other sites
STRUNK 270 Posted October 31, 2020 Report Share Posted October 31, 2020 Ok, I got it now. The "name" I give it in my script is only a reference so I don't have to worry about spawned objects getting the same name. entity light = sys.spawn("light"); light.setColor(color_x, color_y, color_z); light.setOrigin(obj.getOrigin()); light.setRadius(80); light.bind(obj); string myStr = light.getName(); sys.println(myStr); I get a something like idLight_light_54 .. so that's already taken care of by the main script : ) Quote Link to post Share on other sites
joebarnin 245 Posted November 1, 2020 Report Share Posted November 1, 2020 2 hours ago, MirceaKitsune said: Another simple one I forgot to ask: How do I make a readable note appear in the player's inventory at map start? https://wiki.thedarkmod.com/index.php?title=Inventory#Default_equipment_for_map_start Quote Link to post Share on other sites
STRUNK 270 Posted November 1, 2020 Report Share Posted November 1, 2020 (edited) I made the trigger_poltergeist : O It was an idea and a little script from @MirceaKitsune and I turned into a trigger. Only thing is the stim response workaround and I would like to give the script an other name then tdm_reuseable_script .. but I had no success with that at the start, and didn't try anymore. Can some of you maybe test it and/or optimise the script, if needed? Here is the .def .script and a custom .prt tdm_fire_torch_small_blue.prtcustom_trigger.deftdm_reusable_script.scripttdm_custom_scripts.script .script(s) go into your script folder, .def goes in your def folder and .prt goes in your particles folder. If you don't have these folders, create them : ) Edited November 1, 2020 by STRUNK Quote Link to post Share on other sites
STRUNK 270 Posted November 1, 2020 Report Share Posted November 1, 2020 Here is a testmap with a lot of stuff already targeted WS25.map Quote Link to post Share on other sites
MirceaKitsune 249 Posted November 1, 2020 Report Share Posted November 1, 2020 2 hours ago, joebarnin said: https://wiki.thedarkmod.com/index.php?title=Inventory#Default_equipment_for_map_start That did it, thanks! Quote 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.