Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    479
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by STRUNK

  1. @Geep Maybe just remove the one and spawn the other in the same place?
  2. @MirceaKitsune I tried the set model s/r and I kept getting black boxes so I tried "remove" and "spawn entity" and that works. Select the entity tht must change upon a trigger from the objective and give it trigger as stim and trigger as response, then add effect remove, and select the object that you are setting the s/r on, and then add an other effect spawn entity. There you set the entity that it must become, and fill in the origin. For the origin just place th entity in the right place and copy the coördinates.
  3. So far the fire fly is working fine, but I'd like to have it do some thing's that it doesn't do now: It should flee .. health = 5 health_critical = 30 .. but it doesn't flee. [Also I would like it to travel up and down more.=solved] And it would be nice if it could start sitting or sleeping and only start moving when it's alerted.
  4. I'm messing around with the AI elemental to use as a base for making a AI firefly and it's getting along quite good, only I want to change the model, that is already a sphere, to a tiny sphere ... but how? Is there a simple solution for that?
  5. Here is a testmap with a lot of stuff already targeted WS25.map
  6. 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 : )
  7. 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 : )
  8. @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
  9. @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?
  10. 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?
  11. @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?
  12. @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 : )
  13. 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 : (
  14. @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 : )
  15. @MirceaKitsune I really can't think of any way to accomplish that ...
  16. @MirceaKitsune Lol, I let your script and mine run together it does add up, where your script also has a difference in move speed and distance moved, my script just flings the stuff with the same speed. Also, sometimes two objects move at the same time this way or get influenced by the 2 scripts in the same move. Maybe you could try running your script 2 times (different names and different random triggers)? VIDEO - 2 annoyed Ghosts throwing stuff around I make a little bow for script btw, I can't abbreviate my thought into script like this, 'caus i'm thinking cogs and rods : ) Also, is it an objective to set the ghosts free?
  17. Nice! You are learning fast! You trigger it with a trigger with random wait time I guess? I posted a video with added fx. You could use the same trigger and an other trigger to tiggeron/off sound and visual fx : ) In my adjusted script it also only jerks on it. Looks quite spooky actually. I found there is also moveable loot that can be used, only if the player get's the loot it's still listed in the trigger_sequencer, and the script stops when it can't find the (random chosen) entityname.
  18. VIDEO: randomly thrown stuff by scary ghosts part 2
  19. @MirceaKitsune This is funny stuff : D I got it figured out. You can use all entitys from the Moveables category (Create entity -> Moveables) and you need to set the spawnargs of all the items to frobable : 0 , otherwise strange things happen when you are holding one of the items. It doesn't matter where you put them. The next step will take care of it. Next you need to create a trigger_sequencer (Create entity -> Triggers), name it Stuff, and target (ctrl+k) all of the items that you want to be thrown. The script will randomly pick one of the targets from the "list" of targets that this trigger_sequencer has. Then you have to make a moving object, like a sliding door, to be the target that the stuff is thrown towards, and name it ThrowTarget. Here is an example of how I set the spawnargs on this (see video at the end): Also you have to create a little brush and make it a func_mover (Create entity ->Func -> Movers) and name it Mover. This wil go, by script, to the position of the item that is to be thrown and then to the position of ThrowTarget, and the stuff binds to it, and unbinds. The script to start it all is StartThrowingStuff and can be called by a target_callscriptfunction, an objective, etc. Here is the script: And here is a video of the test in my workshop, where the blue block is ThrowTarget, and the red cube is Mover (they shall be textured NoDraw ofc. but for now it shows a bit of the mechanics at work): VIDEO: randomly thrown stuff by scary ghosts part 1 There are still tweaks possible, like having the stuff not thrown that hard, changing the ThrowTarget path, or have it thrown toward, but not directly at, the player. Even a throwing sound can be added and spooky light/particle fx : )
  20. @MirceaKitsune I have something simple but effective working for 1 object now. It looks just as throwing and it's going a different direction every time. Tomorrow I'll look at how to have more objects thrown in random order, with random time between throws. This is already very cool, and with very little change throws can be at the players head also : D
  21. @MirceaKitsune There is a scriptfunction moveToTarget that I use for a bat, chasing a semi-random moving target. You could have some targets moving "around", and have the items move to these targets. Do they have to fall down again?
  22. @MirceaKitsune I can't think of another posibility. You already have a script for the killing AI when taking the trophy (I think). This works the same and you put it in the same script file, so it should be easy. Only thing is you have to put all your locations into it to get all their music to nosound so only the final music is heard everywhere.
  23. @MirceaKitsune Ok, you can add the following to your script, that can be called by completing an objective: void ChangeMusic() { $LocSet.stopSound(0,0); //LocSet is the name of the atdm:location_settings sys.trigger($FinalMusic); //FinalMusic is the name of a atdm:speaker_ambient_music $LocSet.setKey("snd_room1","nosound"); //snd_room1 is the name of a location $LocSet.setKey("snd_room2","nosound"); } An atdm:speaker_ambient_music is heard in the whole map, so you set the music there that should be played from that moment to the end. You should aad this in your map and make shure to set s_waitfortrigger:1
  24. @Bienie That is even less script, so that's good : ) I thought acuity_tact to 0 would somehow change the behaviour of AI a bit and would be least noticable on zombies. Intrestingly zombies don't seem to need having StimEnable (14, 0) on the dead bodies to not see them. Could you test with only acuity_tact:0? It looks like that might be the only thing needed from my quick test.
  25. @MirceaKitsune Dou you have all the music for your locations defined in your location settings entity?
×
×
  • Create New...