Jump to content
The Dark Mod Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by MirceaKitsune

  1. Such great work again! As I want to have the latest version and helping with testing is the least I can do for all your work, I got the installer and am upgrading to the latest beta right now. Will let you know if I find any bugs... for reference I'm testing on Linux (openSUSE Tumbleweed) x64, AMD card running on the free video drivers (amdgpu / Mesa). And as suggested in another post I'm going to enable r_shadowMapSinglePass too and see how much that improves FPS and if without breaking stuff.
  2. Didn't think mapping could be even further improved, yet this feature sounds like a great way to do it. Thank you for another great idea! So if the player modifies the map in DR and saves it, they can automatically alt-tab switch to TDM and see the changes? First issue that pops to mind is how adding or removing areas may cause the player to get stuck inside walls or left floating / falling in the void, unless there's a smart way to know how to reposition them. The rest I'm assuming solutions have been found for... like caching newly added textures in realtime, I know the engine wants eve
  3. tdm_events.script seems to contain documentation for the same functions as the Scripting Reference page. I search these periodically, however they don't provide functions or information for a few of the things needed.
  4. Fun fact: I never knew about testmap, always used dmap followed by map separately. This is actually a little easier now that I know about it!
  5. Aha... I see it now: So I would use $player1.heal("air", 1) to make the breath restore more rapidly. But how do I decrease the breath down to a certain amount as well... should I use heal with a negative value, a $player1.damage() event I can call with the right damage def, or perhaps there's a flag I can use to make the player act as if underwater? Also I don't even know how to read the breath of the player... we have $player1.getHealth() but no such thing as a getAir().
  6. Much appreciated. The speaker remains unclear so for now I'm not implementing the sound part... it's no emergency anyway. I took note of the entity finding script, just what I needed for what I hope to do next Using "player self = $player1" will correctly let me access the AI flags; I assumed that $player1 is automatically of type player, but now that I think twice it's indeed a plain entity definition. I can correctly read flags like self.AI_CROUCH now... but when it comes to crouching how can I also set it and tell the player to crouch? I looked in the builtin scripts directory bu
  7. Never thought of using Google to search a forum... also I don't use Google to avoid being spied on, I default to DuckDuckGo. That thread offers exactly the info I needed! So to boost the player speed you use something among the lines of: vector boost = $player1.getMove() * '10 10 1'; $player1.applyImpulse($player1, 0, $player1.getOrigin(), boost); I haven't tested it yet but if it works that should take care of that. Please let me know about finding entities of a given type within a certain radius, still don't know where to start there. The sound isn't urgent for what I'm doing for now.
  8. Running into a few more issues. One is how I'm trying to spawn a speaker (attached to the player) and have it loop a sound... $player1.startSound() doesn't handle looping nor does it allow me to stop the sound once it no longer needs to play, thus I'm using a speaker instead. The entity probably spawns but the sound cannot be heard. I couldn't find any function to set the sound so I just used setKey, however this doesn't seem to be enough. What am I missing please? entity my_sound; my_sound = sys.spawn("speaker"); my_sound.setKey("s_shader", "eerie01_loop"); my_sound.setOrigin($player1.get
  9. I'm referring to the settings in this menu: I want to attach custom components to the lightgem for instance, thus I'd like my GUI element to follow its size setting and especially the HUD opacity. The settings themselves are just cvars so I'd only need to know their names... followed by how a GUI definition can translate a float cvar into a rectangle component (I'll look for the answer among existing GUI's).
  10. Most of the above issues have been answered. Seems I can discover a lot by looking at the script reference wiki page mixed with unpacking the default scripts directory and using grep to look through the code. Only a simplistic implementation is possible but I can put part of my idea in practice at least. For movement $player1.setHinderance and $player1.setTurnHinderance are what you need... could have really used one for jumping too but for now this will do. $player1.disableWeapon and $player1.enableWeapon can be used to block the weapon. Only concrete question that remains unanswere
  11. I see... definitely gets more complicated, thanks. It's worth noting that in this case what I'm trying to do isn't a map script but an addon, intended to work in every FM and which people can install by placing the pk4 in their TDM directory. Of course it's limited to the "hooks" allowed by map script functions as I don't plan to modify default scripts (that would be a nightmare to maintain even if I knew how to do it). Yes I was thinking of checking health changes in a loop, which from other examples I'm seeing is as simple as using while(1). The problem is that for what I need I also mu
  12. There's another little something I wanted to work on in terms of scripting. I wanna keep exactly what I'm doing a surprise... maybe I'll decide to release this one as a Christmas gift or something So instead I'm going to ask about exactly the stuff I need to do with my script... this time a script that affects the player. Here's a few different things I need to do for starters: How do I define a custom variable on an entity, in this case the player? I know I can't just write $player1.mycounter = 10 as the script would complain that "mycounter" is not defined: Is a separate function ne
  13. I simplified the code a bit and gave alert / evidence states priority over the normal voice (customized with the frob_bark parameter) while alert state checks were fixed so both levels are within normal bounds. Use whichever version of the script you find most fitting for your FM of course. void ai_frob(ai self) { if(self.AI_DEAD || self.AI_KNOCKEDOUT || self.AI_AlertLevel > 2 || self.isEnemy($player1)) return; string frob_type = self.getKey("frob_bark"); string frob_bark; if(self.AI_AlertLevel > 1) { frob_bark = "snd_warnSawEnemy"; } else if(self.AI_AlertLevel > 0)
  14. First off thanks to Dragofer and other users who helped with the scripting basics needed to get this done. As a detail for some FM's I plan to make in the future, I wanted to have it possible for friendly AI to be frobbed for idle chatter, causing them to say something random to the player. I first tried with conversation entities but the setup was too ugly and complex, so I decided to do this using one script function. I succeeded with pretty nice results, thus I figured I'd share this for other FM creators to use as well. The thing I like most is that it only requires one universal func
  15. Confirming it worked: Replacing "entity self" with "ai self" is what was needed to fix that last issue. I have everything I need now. The script is working perfectly and I'm loving the results I get! Thanks once more for the help I'm doing the finishing touches and should be able to post it tomorrow.
  16. Using self in this case, I still get the crash on startup. I really wonder what might be causing it void ai_frob(entity self) { if(!self.AI_DEAD) { ... } } Sys_Error: Error during initialization. Error: file fms/testing/script/ai_frob.script, line 4: Unknown value "AI_DEAD"
  17. I was able to refer to the frobbed entity by giving my function an entity parameter: I think TDM knows how to send it by default or something. So using this definition I'm able to refer to the frobbed AI as "self": void ai_frob (entity self) I already looked on the scripting reference wiki page and could not find a builtin way to check if the AI is dead or alert. The closest function for alerts is getAlertLevelOfOtherAI() but as its name implies it refers to another AI. Closest thing I could try with the available functions is this, but it doesn't work unfortunately (AI still talks whil
  18. Managed to fix all of the above issues! Except for two which are the last things I need to finish the script: Detecting if the AI is dead or alert. Please let me know how to properly check the AI_DEAD and AI_AlertLevel flags. The AI can be made to properly speak a line using ai.bark("snd_greeting_generic"). Only limitation is that the sound needs to be defined in the vocal set, you can't use custom sounds... a small price to pay for salvation
  19. Lots of issues, can't find answers to many of them on the Wiki. The script crashes so I can't even test till I fix those. First of all the #include argument complains that no file name is given when one is. My tdm_custom_scripts.script contains the line "#include script/ai_frob.script", but this causes the engine to crash with the error "#include without file name". How can there be no file name when I just wrote it in that line?! To clarify the last basics: How do I refer to the entity triggering the script function? Your response above implies I use $ai1... as I refer to the player
  20. Thanks for the answers. The biggest problem sounds like the fact that playing a sound on the AI from the script won't handle lip-sync, as well as making sure the voice won't be interrupted if the AI says something else so they don't have two sounds coming out of them. That's a huge limitation! Is there really nothing that can be done here? If I'm doing it this way I'd rather not use the conversation editor nor S&R system: I wanted to go that route if this was possible with just entities, with scripting it only feels right if the function can handle everything and I only use spawnargs
  21. map scale (the_texture, parm0, parm1, parm2, parm3): Causes the flames to become completely invisible. map scale (the_texture, 1, 1, 1, parm3): No change from not using it at all, you still see the flames popping out of existence instead of fading away. Apparently the engine really wants me to use vertexColor, which I cannot as it overrides the colored parameter and causes colorization to stop working. It take it vertex colors are somehow used to tell the particles when to fade... I'd need to somehow set only the alpha channel from it but leave the RGB set by the entity.
  22. I tried using "vertexColor parm3 * 0.4" as suggested by nbohr1more. No idea why that post isn't appearing here any more, I could only see it from an email notification. Sadly it only causes the particles to turn into black boxes without solving the fading issue.
  23. In the end I feel I prefer this approach, just a script without any S/R. Especially since I don't like having to use so many custom entities for every AI including new conversation definitions: With a script I could define an universal system for interactive talking... if I can pass arguments from the spawnarg I could even customize the voice this way! It would also fix the dead / alert / allied issue... the AI can remain frobable but simply do nothing if the character isn't in a state to talk. It seems neither the wiki nor Darkradiant spawnarg docs help me with frob_actionscript. How do
  24. I'm trying to prepare a test case for something I plan to have in some FM's: Friendly AI who talk when frobbed... it''s mainly greetings or other conventional voices, just a detail but one I'd like to have. There are quite a few issues I'm not sure how to work around in this, especially without a custom script. So far I added my AI, the atdm:conversation_info entity, and the atdm:target_startconversation entity. The conversations themselves are set up, a simple talk action on the actor of the AI. The AI has the flag "frobable 1": I can tell this works as his body lights up when you look a
  25. Got them working! Now the entity's "_color" parameter automatically colors the flames as well. I had to redefine all the flame materials but the new mtr is a single set so it's no issue. Please try out the update and see if everything's good. There's only one problem: I have to comment out the "vertexColor" parameter in order for the "colored" one to work. This seems to cause the particles to appear and disappear suddenly (no fading). Not sure what solution there is to this side effect. color_lights_1.3.pk4
  • Create New...