Jump to content
System downtime for updates - Sunday 13 July 2025 ×
The Dark Mod Forums

STRUNK

Member
  • Posts

    564
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by STRUNK

  1. I'm trying to make a new target entity called target_keyval to be able to change the spawnarg value of an entity, like a door. So far the script is running and the sys.println(); prints the right strings to the console, but it does not work . Somehow $target_name.setKey("m_key","m_value"); doesn't take the strings I try to feed it. When I put it manually in the script it does work ... #ifndef __TARGET_KEYVAL__ #define __TARGET_KEYVAL__ object target_keyval { string m_target_name; string m_key; string m_value; void init(); void set_key_value(); }; void target_keyval::init() { m_target_name = getKey("target0"); m_key = getKey("set_spawnarg"); m_value = getKey("set_value"); } void target_keyval::set_key_value() { $m_target_name.setKey("m_key", "m_value"); //When I manually put $atdm_3panel_104x56_1.setKey("trigger_on_open","0"); it works. sys.println(m_target_name); sys.println(m_key); sys.println(m_value); } #endif __TARGET_KEYVAL__ Does anyone have a clue how to fix this?
  2. @JackFarmer That's pretty weird indeed, Do you have filters on in darkradiant that might prevent you from seeing these in the editor? Did you try selecting only the arches and moving them up, and then see ingame if these "pataches" also moved? Did you try deleting things 1 by one, each time checking in game if the "patches" are still there, to sort out where they come from? Did you make it all func_static? Just a few suggestions, for I really don't know what this is ...
  3. @JackFarmer Do these black "patches" move when you move?
  4. @JackFarmer I have video's from streamable.com .. and they don't show up, only the link ... But I guess that's just how it is then : )
  5. @R Soul It can't be downloaded anymore. Can you re-upload it? This is a mf good looking set of buttons. Sorry I wasn't looking. Have downloaded it now : ) And if you might have time to much, I would like a 5 button version for my diorama ^^ https://streamable.com/7xy8n With your custom square buttons it already looks very good:
  6. How to embed a video on the forum??
  7. The Turret. VIDEO The Turret works with a little script with 2 functions in it. These functions are called by "atdm:target_callscriptfunction"s (the yellow cubes in the picture) and are triggered by "trigger_timer"s (the purple cubes in the picture). "trigger_timer"s can be triggered on and of by other triggers. In the spoiler I put the script, with, i hope, as many information you need to understand a bit what is going on, so you can adjust it to your needs. You can use the script as is and give your own entities the same names as the entities in the script. (Script is also in the Turret.pk4) In the Turret.pk4 is the mission folder with in it the map folder and the sound folder. In the map folder is the Turret.map file and the Turret.script file. They both have to have the same name otherwise the script won't load, and won't work. In the sound folder is the soundshader Turret.sndshd that is needed for the custom explosion sound I made (from a thundersound that is already in the game) to be loaded. A soundshader file is actually very simple to make, and adding custom sounds to your map is therefor very easy. The audiofile is in the sfx folder, that's also in the sound folder. Questions? Ask them. Have fun : ) Turret.pk4
  8. @Dragofer They are in the def file, and I get a blu escreen when something in the reuseable script is not in the right syntax. I can't find the syntax to put the void ResponseEnable(float type, float state); in the mover_move script, so I showed the spawnags. Maybe you know what the right syntax should be? It should work from the script folder in the end ... : )
  9. @Dragofer "sr_class_1" "S" "sr_type_1" "STIM_TRIGGER" "sr_state_1" "1" "sr_class_2" "R" "sr_type_2" "STIM_TRIGGER" "sr_state_2" "1" "sr_effect_2_1" "effect_frob" "sr_effect_2_1_arg1" "_SELF" I can't find any way to put it in the script without having a blue screen ... above the s/r values It would be fancy to have it be able to be blocked, and move on when unblocked. It woud be interruptble also that way. But I wouldn't know how. Maybe check the script for doors .. ?
  10. @Dragofer Should anything be able to stop this mover anyway?
  11. @Dragofer As what the sound concerns. I have set them to nosound by default. I tried some non looping sounds and heard something so thought: it works. I'll have a look in some sound fade event I saw. About s/r, I saw it in some defs .. don't now witch one, there I got the idea. I'm trying now to change the spawnarg/keys that call the scripts, to stop mover_move to react to trigger/frob input, but with no succes. So looking to manipulate s/r seems a good next approach. Somehow this is like a puzzle game on it's own, you only have to set your own objectives : )
  12. @Dragofer @JackFarmer Ok, so I have almost all working without having to assign a button/speaker/target_callscriptfunction, but now it's possible to trigger/frob the object and it starts move mover echt time you do, and I can't get that under control. You're reusable script without the button and the speaker (so button can't be switched off like before) The custom def file (does'nt have to be called tdm_func.def I found out) So .. almost there. I think "interruptable" should'nt be an option now I think of it. You want to have the mover finish the movement anyway. I don't know also if "nopush" should be an option also.
  13. @Dragofer I found somethng. I looked al all the inherited spawnargs/functions and there is "editor_var frob_action_script" "Script to call when this entity is frobbed." I put it in the custom def file, and it works when frobbed, not yet when triggered, but I get warnings concerning the reuseable script, so there might be something conflicting : )
  14. @Dragofer I put the sound spawnargs from the original tdm_func.def in the local tdm_func.def and they work \o/ // Custom defenition entityDef func_mover_dragofer { "inherit" "func_mover" "spawnclass" "idMover" "editor_displayFolder" "Func" "editor_usage" "A custom func_mover by dragofer" "editor_var scriptobject" "Scriptobject this entity uses. Don't change." "editor_float time" "total time taken to move" "editor_float accelTime" "time taken to accelerate" "editor_float decelTime" "time taken to decelerate" "editor_var translate" "amount to translate" "editor_var rotate" "amount to rotate" "editor_bool invert" "should the mover invert after (invert_count) number of movements" "editor_float invert_count" "number of movements the mover should make before inverting movement direction" "editor_var speaker" "name of the speaker the speaker bound to the mover. Unfortunately directly scripting sounds for movers is broken. #5102" "editor_var button" "name of the button controlling the mover" "editor_snd snd_accel" "sound to play when acceleration starts. Played on SND_CHANNEL_BODY & SND_CHANNEL_BODY2." "editor_snd snd_move" "sound to play when movement starts. Played on SND_CHANNEL_BODY & SND_CHANNEL_BODY2." "editor_snd snd_decel" "sound to play when deceleration starts. Played on SND_CHANNEL_BODY & SND_CHANNEL_BODY2." "scriptobject" "reusable_script" "time" "2" "accelTime" "1" "decelTime" "1" "translate" "50 0 0" "rotate" "50 0 0" "invert" "1" "invert_count" "4" "speaker" "put the name of the speaker entity here" "button" "put the name of the button entity here" "snd_accel" "nosound" "snd_move" "nosound" "snd_decel" "nosound" } tdm_func.def
  15. @JackFarmer As you wish, and you're welcome : )
  16. @JackFarmer I made one without the light on and one with the light off: Lanternbot models
  17. @demagogue That's the thing, it only has the model name, nothing more. @JackFarmer Only thing is, it has it's light on ... I'm looking now how to turn that off before exporting the model.
  18. @JackFarmer If you only want to use the model, and you can't find the model, like me, just put the steambot somewhere and Export selected as model .. ^^
  19. @JackFarmer This lanternbot only turns toward you but stays idle in the same place. Don't know how it reacts on guards or monsters/
  20. @Dragofer Thanx for pointing out Obsttorte's turning statues script. He makes use of a system script event "VecToAngles()" that calculates the angle from a given vector. I took a part of the script and it now totally works without having to bind the statue to an elemental : ) void LookAtPlayer() { //Makes $Statue look at $player1 vector direction=$Statue.getOrigin()-$player1.getOrigin(); direction_z=0; $Statue.setAngles(sys.VecToAngles(-direction)+'0 90 0'); }
  21. @Dragofer I think a mover entity like that would be very useful to a lot of mappers. I only began looking into scripting since this year, and before thet I would usually use doors for like everything that has to move. If this entity was available then I would heve used it for sure. Only think I think of now is that it should be able to trigger things, like doors do. The script event to get rotation of an entity is vector getAngles() https://modwiki.dhewm3.org/GetAngles_%28script_event%29
  22. @Dragofer @JackFarmer I made a custom definition for func_mover_dragofer that has all the used spawnargs and "help" text in it, and it works so far. Only thing is you still need to manually target the atdm:target_callobjectfunction to call the script move_mover, and manually put in the names for the button and speaker. If we somehow can manage to get the name of the button targeting the func_mover_dragofer and have de audio play from the script + target the move_mover script from this definition, it would be rather awsome. Maybe it should have a frob on/of function like a door, and have an interuptable/not interuptable function also, so it can be triggered by frobbing, or any button/switch/trigger you want. Put a folder "def" in your own mission folder and put tdm_func.def in there. (re-start darkradiant) func_mover_dragofer should be selctable when you rightclick and select Create Entity. It's on the top of the list in "fms". tdm_func.def
  23. @Dragofer I checked out your scriptobject script and map, and it is awsome. This opens a lot of possibilities. Thank you very much for working this out!
  24. Result so far: https://streamable.com/ydj9i
  25. You are totally right : )
×
×
  • Create New...