Jump to content
The Dark Mod Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


joebarnin last won the day on December 7 2020

joebarnin had the most liked content!

About joebarnin

  • Birthday 04/29/1959

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Gender
  • Location
    Santa Cruz, CA

Recent Profile Visitors

2298 profile views

joebarnin's Achievements

Advanced Member

Advanced Member (3/5)



  1. @DragoferThanks. I just tried your suggestion, and it looks like clearing immobilization is necessary, but not sufficient. Without a way to set m_bOnClimb=false (or m_bOnRope = false in the case of climbing a rope), the game still thinks the user is climbing on the ladder/rope. There doesn't appear to be a way to call ClimbDetach() or RopeDetach() from a script. The only way I can find to cause RopeDetach() to get called indirectly is to remove the rope, which I'd rather not do. I'll submit a ticket.
  2. Not sure if this counts as a newbie question. I'm using a func_teleporter. The teleporter fires at an unpredictable time; as an example, presume that I've got a script that invokes the teleporter every 5 minutes (that's not exactly what I'm doing, but it works as an example). It works fine normally, but if the player happens to be climbing a rope (from a rope arrow) when the teleporter fires, the teleporting doesn't work as I expect. The player is teleported to an incorrect location, and the physics engine seems to think that he is still climbing a rope (i.e., the player can still climb up and down as if they were on a rope, but there is no rope at the new location). It looks like the teleport code doesn't cause the user to "let go" of the rope, or something? Is this a bug, or ...? In scripting, is there a way to force the player to let go of a rope? I've experimented with removing the deployed rope, and that does cause the player to let go and the teleport works as expected, but that's suboptimal (now the rope is missing).
  3. I think there's probably a way to make this happen with a custom s/r and some scripting. I'll think about it. Edit: here's how. Set up a custom stim near the light, with an appropriate stim radius. The stim fires every 200 ms. Add a corresponding response to the player object. Custom responses call a script. That script looks like this: if (!light_already_on) { $mylight.On(); light_already_on = true; lightTime = sys.getTime(); thread checkLight(); } lightTime = sys.getTime(); light_ready_on is a global boolean, lightTime is a global float. Basically, the response script stores the latest systime that player was near the stim. The checkLight thread is this: void checkLight() { if (sys.getTime() - lightTime > 0.5) { $mylight.Off(); light_already_on = off; } sys.wait(.1); } Once the light is on, the checkLight thread wakes every 100 ms and compares the current time with the "last time the stim was fired". If it's more than a certain value, the user has moved away and the light is turned off. Completely untested. Also, the various timing parameters might have to be changed. But it's an idea.
  4. In general, I feel it's best practice to extend an existing definition, rather than copying it and modifying it. Say, for example, in a future release of DM, the developers make a change to the tdm_player_thief.def file. With my original technique, anyone playing my mission won't see that change (because my mission is using a cloned version of the old tdm_player_thief.def file). With my preferred technique, that change will be maintained, because I'm just extending the existing definition.
  5. @JackFarmer For this mission I have a unique projectile (something like a fireball) that doesn't actually damage the player when it hits them, it has some other effect. I decided to implement this using stim/response. So my fireball has a stim attached to it (more accurately, the stim is attached to the "def_result" associated with the fireball). When the fireball 'hits' the player, I want a certain effect - this is implemented by a response. So the response has to be defined on the player object. The technique I describe above enables you to add responses to the player object. (It also enables you to change other player parameters, like walking speed or starting health, by the way). Maybe there's a better way to do this, but the technique I describe seems to work. Hope this makes sense.
  6. Never mind, I figured out a better way. In a .def file, define a custom 'player' that inherits from the default and includes the custom responses. Something like: entityDef my_player_thief { "inherit" "atdm:player_thief" // add custom responses "sr_class_5" "R" "sr_type_5" "1000" ... Then, on any worldspawn, define a spawnarg, "player_classname", with a value of your custom player entity (in this case, "my_player_thief"). When TDM starts it looks for that spawnarg on the worldspawn, and spawns that entity instead of the default one. Since my_player_thief inherits from atdm:player_thief, it behaves just like the default player, except for the changes you add/override.
  7. I have some user-defined stims (sr_type >= 1000), and I want the response to be attached to the player object. How is this done? The only way I could figure out is to clone the default tdm_player_thief.def file into my mission folder, and modify it by adding my responses to the atdm:player_base object. This works, but it seems suboptimal (and maybe risky?). Is there a better way?
  8. ai_type of "human" wont work. I think it's looking for a number, and it looks like humans are 0 (zero). So try "0" instead of "human" for both of those. Hmm, I just noticed that later in that wiki entry, it says "ai_type Type of AI: human, beast, undead, steambot, etc. (reads m_AIType in the SDK, which is set by the "type" spawnarg on idActors. Not sure if this is implemented yet)." Hopefully, 0 will work for humans.
  9. Is there a script call that will tell me if an entity is in the player's inventory? Or, a call that enumerates all of the items in the inventory? getNextInvItem() isn't appropriate, as it actually modifies which inventory item is active to the player.
  10. @GeepMy loot objectives look the same, except I don't set the Irreversible flag (both places). Try unchecking those and see if it works.
  11. My trigger_hurt can be toggled. I've got a brazier post that you can climb up on. The flame starts out lit, so the trigger_hurt is on. If you douse the flame, the trigger_hurt turns off, and if you relight it, it turns off (this is accomplished by adding "target=trigger_hurt_1" spawn arg to the flame). I can douse and light the flame back and forth several times, and it works. What are the details of what you are trying to do? How do you activate the trigger_hurt?
  12. Clever idea. How does it attach on the player's side? I can see how it sticks into the other side, just like a regular rope arrow. But what happens to the 'end' of the rope near the player? Does it magically attach to something? Maybe you have to be standing next to some sort of attachment object, and then the end of the rope attaches to it once the arrow is shot. Or maybe after you shoot the Tight Rope arrow, the end is 'attached' to you, and you have to walk over to the attachment object and interact with it to make it stick. Also, I think the rope will have to sag a bit or it may look cheesy?
  13. What sad news. RIP greyman. Condolences to his family and friends. He was an important contributor to TDM, and the William Steele series will live on.
  14. Congrats! This is an excellent mission - enjoy, everyone!
  • Create New...