Jump to content
The Dark Mod Forums

joebarnin

Member
  • Posts

    1085
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by joebarnin

  1. I've got an atdm:ai_elemental, and I want to augment its death behavior. So I implemented a script and set the "death_script" spawnarg to "testDeathScript". Works fine, my death script gets called. But, this bypasses the base death script functionality, which I want to have happen as well. Is there a way to call the base function that I've overridden? I tried a few ways. Among others, I tried: void testDeathScript(entity ele) { ele.onDeath(); } results in ERROR:Error: file maps\rock.script, line 81: Unknown value "onDeath" void testDeathScript(entity ele) { atdm:ai_elemental elemental = ele; ele.onDeath(); } results in ERROR:Error: file maps\rock.script, line 81: Unknown value "atdm" I worked around it by copying the content of the onDeath script into my script. That functions correctly, but it seems like perhaps not the best programming practice. Is there a way to call the 'base' function in this case?
  2. It was happening in one of my missions. I worked around it by adjusting the position of the ai, the chair he was sitting in, and the table he was near, until it didn’t happen anymore. But, since it was an intermittent problem, I was never sure that I actually eliminated the issue. It just never happened again in my testing.
  3. I have a trigger_multiple, and I want to be notified whenever the player is within it. The trigger_multiple targets an atdm:target_callscriptfunction. I also set wait=1 on the trigger. When the player is within the trigger area, the script gets called once a second. This happens if the player is moving or stationary. So everything is working great. I also want to be notified if any other AI is within the trigger area. So I added the anyTouch=1 spawnarg. Now, when a guard walks into the trigger, the script function gets called. As long as he's moving, it gets called (once a second). But as soon as he stops, the script is no longer called (I assume becase the trigger is no longer firing). This is true if he is just standing there, or is stationary because of a path_wait. Summary: a trigger_multiple will fire each time the player is within the trigger. But a trigger_multiple with anyTouch=1 will only fire for other AIs if the AI is moving. If the AI is stationary, the trigger no longer fires. Intentional, or bug?
  4. I think you want to use a func_rotating. Not sure how. Check out @JackFarmer's 'Hidden Hands: The Lost Citadel' mission - there are objects that rotate when you push a button.
  5. I haven't tried this myself yet, but I found some script code in another project that fades a light from one color to another: // Transition vector delta = col2 - col; float starttime = sys.getTime(); float endtime = starttime + fadeSeconds; float nowtime = sys.getTime(); while ( nowtime < endtime ) { float frac = ( nowtime - starttime ) / fadeSeconds; theLight.setLightParm(0, col_x + (frac * delta_x) ); theLight.setLightParm(1, col_y + (frac * delta_y) ); theLight.setLightParm(2, col_z + (frac * delta_z) ); sys.waitFrame(); nowtime = sys.getTime(); } // Finalize colour theLight.setLightParm(0, col2_x ); theLight.setLightParm(1, col2_y ); theLight.setLightParm(2, col2_z ); 'col2' is the new color, 'col1' is the old one. 'fadeSeconds' is how fast to fade. Give this a try?
  6. func_pendulum IIRC (I don’t have my computer in front of me). Set it up and bind the visible object to it. There’s one in my mission Now and Then
  7. There's such a fine line between a good deed and bad deed...
  8. I was going to say 'no', but I decided to hunt around on some old backup disks, and lo and behold, I found the original mission (the beta, not the additional changes). I opened it up in DR, and man is it ugly. Simple, plain, nothing clever or interesting. I can see why the beta testers wanted changes. I'm glad I threw it away and started over.
  9. Hmm. Just tried it again, and it all works fine. Maybe one of my keyboard keys was stuck or something. Or maybe I was dreaming. Anyway, all is well now. Sorry for the false alarm.
  10. I like this feature - especially because it allows you to select and manipulate objects that are in a group, something I just complained about a few days ago. Good timing! I played around with it for a few minutes, didn't see any issues. However, I did notice something in this version of DR. The Camera view does not behave as expected. Examples: In Camera view, the ESC key no longer deselects. In ortho views, ESC deselects fine, but in the Camera window, it doesn't do a thing. Undo doesn't seem to redraw in the camera window either. Selecting an object in ortho view doesn't highlight it in the camera window. Are these known issues?
  11. I'll definitely investigate and see what's up - those fireballs are heavily customized. Thanks for identifying the problem.
  12. @MirceaKitsuneI installed the latest dev version of TDM, and this problem happens for me too. So it is definitely related to that. I'll take a look at it, but I think your best bet is to restart the mission with the 2.10 release - that's the only release it's 'certified' on.
  13. I've seen a technique for doing this, in The Painter's Wife. I borrowed the code myself for a WIP. The technique is basically to override the multistateposition object (defined in tdm_movers.script) and implement the onMultiStateMoverLeave method, which stops the elevator before it gets going, tries to close the door(s), and then starts up the elevator again. The code is something like this: void multistateposition::onMultiStateMoverLeaveEffector(entity mover) { door.setFrobable(0); if (door.IsOpen()) { door.Close(); tdm_elevator elev; elev=mover; sys.waitFrame(); elev.stopMoving(); while(door.IsOpen()) //wait for door to close { sys.waitFrame(); } elev.activate(elev.lastTriggeredBy); //once door has closed, set the elevator in motion once more door.Lock(); } else { door.Lock(); } } Take a look at that FM to see how it's done.
  14. Here it is: https://bugs.thedarkmod.com/view.php?id=6135
  15. Huh. TAB works for me on func_statics that were created from brushes. But it doesn't work for groups. I'm running DR 3.3.0, if that makes a difference. Maybe I'll try an older version. Edit: I tried DR 2.11 and that version doesn't work for me either. I verified that my keyboard shortcuts are setup correctly, GroupCycleForward = TAB. @AluminumHaste, is that your setting as well?
  16. DarkRadiant question. How do I select just one item of a group? I have a bunch of entities that are grouped. If I select any of them, it selects them all. But what if I want to select just one (in this case, to change its spawnargs)? Sure, I can ungroup, select the object, then regroup, but I'm hoping there's something more efficient.
  17. I've whitelisted it, and I still get those errors. Originally, the AV program reported this: "The file E:\games\DarkRadiant\modules\sound.dll is infected with Gen:Variant.Tedy.207462 and was moved to quarantine. It is recommended that you run a System Scan to make sure your system is clean." However, I just downloaded the DarkRadiant source from GitHub, and rebuilt sound.dll using VisualStudio. When I use the rebuilt sound.dll, I no longer get the error. So, problem solved. It must have been related to the antivirus.
  18. When starting up DR, I get these errors in darkradiant.log: LoadLibrary failed: 'E:/games/DarkRadiant33/modules/sound.dll' GetLastError: The specified module could not be found. WARNING: Failed to load module E:/games/DarkRadiant33/modules/sound.dll: This could be just me, since I was having problems with my antivirus and that DLL. Can someone else running DR 3.3.0 check their log and see if they have that error? Thanks.
  19. You want to stand on it. That screengrab looks like you're close enough (assuming you're supposed to be on the lower tile). I just did some testing, and there's a large margin of error for your location. I can't figure out why it's being so picky for you.
  20. If I do another update to this mission, I'll add this suggestion. There is no built-in function in TDM to record game play. You'll have to use a 3rd party recorder. Or, F12 (on the PC) does a screenshot, which might be enough to help me figure out what is happening. Next time you fail, don't move, look down, and take a screenshot with F12. You should see the tile looking down - you don't even have to be right in the middle of the tile.
  21. Glad you're enjoying the mission. I'm surprised As for the beggar
×
×
  • Create New...