Jump to content
The Dark Mod Forums

Search the Community

Showing results for tags 'scripting'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General Discussion
    • News & Announcements
    • The Dark Mod
    • Fan Missions
    • Off-Topic
  • Feedback and Support
    • TDM Tech Support
    • DarkRadiant Feedback and Development
    • I want to Help
  • Editing and Design
    • TDM Editors Guild
    • Art Assets
    • Music & SFX

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 4 results

  1. So, as everybody seems to have his own mapping thread, I thought about starting my own. I'm currently working on my map for the "unusual gameplay contest" and just set up a nice working elevator. I took a look one the multi-level elevator tutorial on the wiki and I think that my approach is much more easy to implement, so I thought I could describe it here. The elevator consists out of three parts: - a func_mover entity that will be our elevator-platform - the buttons that will control the elevator - a couple of waypoints, one for each floor what else do we need: a really short script, I'll go to explain further down The first step is to create an elevator-platform. This is your part . If your done with it change its classname to func mover (under entities/func/movers). Rename it to platform. (The names are for referance. Of course you can choose them as you like). The next step is to create some path_corner entities and place them, where you want your platform to stop. Be aware that the origin of the platform entity will move to the center of the bottom face of the pink block representing the path_corner. Let the platform target the path_corners. Make sure you start with "target0", then "target1" and so one. Start with the lowest path_corner and move upwards level by level. Create buttons for every floor on one of the levels. For the other you can just copy them around when we've set them up. On the buttons, you have to set three spawnargs. - target: let the buttons target the platform (so you have to insert its name here) - state_change_callback: set this to "movePlat". This is the name of the function we'll use to move the elevator - moveDir: set this to "0" for the lowest button, "1" for the next one and so one. This spawnarg controls which path_corner the platform should move to When you're done, copy the buttons to where else you'll need them. Ok, that's the setup in Dark Radiant. Now everything that's is needed is a script. And here it is. void movePlat(entity button,boolean bOpen,boolean bLocked,boolean bInterrupted) { entity mover = button.getEntityKey("target"); entity target = mover.getEntityKey("target"+button.getKey("moveDir")); mover.moveTo(target); } The "state_change_callback" is called everytime when the state of the specific object was changed, for example if a button is pressed. The function receives four arguments, of which we will only need the first one. The entity that we get here is the one who has called the script. In this case, the button we have pressed. Now what does the code do. The first line brings us the entity targeted by the button. This is our platform. We need to know this as we want to make it move The second line gives us the path_corner the platform should move to. Here you can see why you should start targeting them from 0 upwards and what the "moveDir" spawnarg is used for. An example: If you push a button whichs "moveDir" spawnarg is "1", than the platform targeted by the button will move to the path_corner targeted by the platform via the spawnarg "target1". The last line is quite self-explaining. It tells the platform to move to the designated path_corner. That's it. Pro's: - short code that is used for every elevator in the map (in fact you can use it for everything that translates) - fast setup Con's: - As I didn't tested it very much I don't know any if you find some please report here What is missing: - there are no sounds set up yet (will add them as soos as possible) - AI's should not yet be able to use the elevator (dido)
  2. Some games fade in player's view (from black) on spawn. I assume it's done to prevent player seeing certain things being spawns and such. So there is a delay between being spawned and seeing the world. I have a few things, particles in particular, that begin emitting at t he same time player is spawned. It doesn't look appropriate as I'd like for particles to be at full capacity when player is spawned. So I figured if I have a delay and the gradual fade in from black on the view, then the issue would be resolved. Is it something engine/game already provides (Doom 3) ? How can I achieve such effect ? Thanks.
  3. Doom 3 question (probably applicable to TDM too) is below. I am not sure offhand, but can I spawn AI hidden? (via entity's property) Can I hide AI via script right after it spawns ? If yes, the question is if that AI is dormant and just hibernates until it's revealed via trigger or script ? Thanks.
  4. Not sure where else to write since TheDarkMod forums is the only remaining outpost for Doom 3 modding. I need to make a mover to move along a spline, when triggered. How do I set it up? Can a mover tilt, following spline's curvature ? Is there a way to attach player to that mover and drop player if he presses a key ? Thanks!
  • Create New...