Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Does anyone know how to create x-ray screens? In the x-ray demo they work, but when I try to create them myself they either don't work, or only show entities.

The lamp has no x-ray spawnargm the rat has skin_xray: visible. If I set it to invisible it doesn't show, so that's good, but the background and light doesn't show. The otheer side of the screen is set to texture milky glass.

newmiss(2023-10-2020-41-44)(1646.44550.37114.25).thumb.jpg.ad5f4382fe63b1925fce606ca216381a.jpg

Edit: This is solved. Xray screens need to be an entity (for example func static). Wiki page is updated with info.

Edited by datiswous
Link to comment
Share on other sites

3 hours ago, datiswous said:

Maybe func_damage is better for that, don't know how to specify the damage amount though.

On the func_damage entity, set spawnarg def_damage with the name of the desired damage entity; see tdm_damage.def for name choices.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

A rather unique idea for a possible FM occurred, though doing it right would require something I don't think is possible, none the less I'd like to know what the closest way is. Is there a way to trigger a reset of the map that makes you start from the beginning from within the map itself, storing only information about particular choices you made during the previous run? I don't care if the loading screen shows up again or not, a seamless way where you just reappear at the beginning would be ideal, but I'd rather avoid the briefing screen and having to pick a difficult again as I don't want the restart to be that total.

Example: During your first run, you're given an objective to kill an AI which you may or may not complete. Upon reaching the end, instead of the FM ending normally and showing your stats, the screen fades to black and you find yourself at the beginning: Everything is reset, all objectives the AI the loot any items you picked up and so on. Based on whether you completed that objective or not before the reset, certain targets are triggered changing a few things on the map during this run.

I case a map reset isn't possible to trigger: Is it at least possible for the FM to store information independently of saves? So you complete the FM normally at first, but next time you choose to play it choices you made during a different playthrough are detected and triggers executed accordingly. I'd rather avoid this method since there's no way to reset it unless you'd manually delete whatever text file is generated in the FM's directory, granted there's a script function allowing this to begin with.

Link to comment
Share on other sites

Could a campaign be wrangled to produce the effect you want? I've never tried, but it seems like it should be possible to set the campaign up to play the same mission again and again. Then you just use the atdm:campaign_info entity as well as persistant args to keep track of what needs to be remembered for each playthrough.

You'd still need to find a way to suppress the intro briefing and end-of-mission stats though.

  • Like 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

5 minutes ago, thebigh said:

Could a campaign be wrangled to produce the effect you want? I've never tried, but it seems like it should be possible to set the campaign up to play the same mission again and again. Then you just use the atdm:campaign_info entity as well as persistant args to keep track of what needs to be remembered for each playthrough.

You'd still need to find a way to suppress the intro briefing and end-of-mission stats though.

I actually thought about it briefly. Biggest problem is the campaign has a finite number of maps listed: I guess I could just list the same map 10 times or something, that would well cover all the options you can get... better off just use the maximum number of runs in which you can achieve every combination!

I remember there was a way to remember choices (from special triggers executing) between different campaign levels, though I never used it before. Will look it up and likely use it with that, seems like the best option for what I'm thinking.

Link to comment
Share on other sites

Adding one last tidbit to my fm: it might be nice to be able to kill an ai by sticking their head in the fireplace or throwing them off a balcony (where fall damage is insufficient).

Unfortunately "trigger_hurt" does not affect an AI that is unconscious. Is there any way around that?   (edit) also tried it with stim/response with the same result: no-effect. 

only drowning seems to work on unconscious AI

Edited by grodenglaive
Link to comment
Share on other sites

On 10/27/2023 at 11:07 PM, MirceaKitsune said:

Is there a way to trigger a reset of the map that makes you start from the beginning from within the map itself, storing only information about particular choices you made during the previous run?

There's a global script function called sessionCommand which you can use to load a new map (even the one you're currently 'in'), and it does start you from the beginning.

You can call from a script thus

sys.sessionCommand("map m2");

I'm not sure about saving info though. Maybe the campaign mechanism already mentioned.

Edited by boissiere
Link to comment
Share on other sites

I'm still curious about part of my question from last time so I can weigh in all options: Is it possible for the scripting system to generate a text file in the FM directory, which can be used to store and retreive information about previous runs independently of saves? I could have a use for that if yes, though I'm not seeing any obvious way in the documentation.

Edited by MirceaKitsune
Link to comment
Share on other sites

2 hours ago, MirceaKitsune said:

I'm still curious about part of my question from last time so I can weigh in all options: Is it possible for the scripting system to generate a text file in the FM directory, which can be used to store and retreive information about previous runs independently of saves? I could have a use for that if yes, though I'm not seeing any obvious way in the documentation.

If you haven't already, take a look at https://wiki.thedarkmod.com/index.php?title=Setting_up_Campaigns#Scripting

Calls like sys.setPersistantArg and sys.getPersistant* might do what you want?

  • Thanks 1
Link to comment
Share on other sites

12 hours ago, joebarnin said:

If you haven't already, take a look at https://wiki.thedarkmod.com/index.php?title=Setting_up_Campaigns#Scripting

Calls like sys.setPersistantArg and sys.getPersistant* might do what you want?

Thanks. That would be the method for going with a campaign: I was wondering if it's possible outside of that as well, I take it that means not. I'll either go with the campaign approach, or if I can find a way to do a partial reset in the map.

Edited by MirceaKitsune
Link to comment
Share on other sites

The player must put four items in the right place. I do this with "moveables" that are added to the inventory and can then be picked up and held in the hand. Once the fourth object is in the right place, the player should automatically drop the final object. How do I script this? There must be two script commands:

1. determine the name of object X , which the player holds in his hand.
2. dropping X (which would work like clicking the right mouse button)

I knew how to do this, but after two years without working on scripts, I guess most of it has slipped my mind. :(

Many thanks,
The Old Man


 

Edited by JackFarmer
Link to comment
Share on other sites

That's pretty much how I did it in my last mission. I also set the object to become unfrobable to prevent the player taking it away again.

  • Like 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

On 10/28/2023 at 5:46 AM, grodenglaive said:

Adding one last tidbit to my fm: it might be nice to be able to kill an ai by sticking their head in the fireplace or throwing them off a balcony (where fall damage is insufficient).

Unfortunately "trigger_hurt" does not affect an AI that is unconscious. Is there any way around that?   (edit) also tried it with stim/response with the same result: no-effect. 

only drowning seems to work on unconscious AI

I wonder if scripting would work. If the AI is $guard1, either $guard1.kill(); or $guard1.setHurt(0);

Maybe you'd have to heal first with $guard1.setHurt(1); then immediately kill.

Probably your script should check the AI_KNOCKEDOUT flag before some of that, to confirm unconsciousness.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

There's another trick I wanted to try but haven't seen done before and it may not be possible but still: Can you make it so when you die, the FM doesn't end but a script function executes or an entity is triggered, ideally only if the player is in a given area? Thus once you reach 0 health, you fall hearing the player grunt sound and the screen goes dark as usual, but instead of the "mission failed" screen you find yourself teleported in a particular room with your health fully restored. The script reference page mentions two functions called customDeath and deathMenu for idPlayer, however they aren't documented... does anyone know if that's what I need and how to use them?

Link to comment
Share on other sites

21 hours ago, Geep said:

I wonder if scripting would work. If the AI is $guard1, either $guard1.kill(); or $guard1.setHurt(0);

Maybe you'd have to heal first with $guard1.setHurt(1); then immediately kill.

Probably your script should check the AI_KNOCKEDOUT flag before some of that, to confirm unconsciousness.

It didn't work. I tried a couple of different trigger brushes pointed to atdm:target_callscriptfunction, but the AI body just won't won't trigger them so the script is never called.

I noticed in the description for trigger_entityname, it says "... Only works on entities that can enter trigger under their own power...if player drops them, there is no effect."  This seems to be the case for the other triggers as well.

I think I'm out of luck on this one, but it was just a nice-to-have, not important.

 

Link to comment
Share on other sites

On 10/28/2023 at 11:46 AM, grodenglaive said:

Unfortunately "trigger_hurt" does not affect an AI that is unconscious. Is there any way around that?   (edit) also tried it with stim/response with the same result: no-effect. 

I wonder if you could place an invisible block of water right above the fireplace. If you shove the head there it would drown? It might disable water arrows though.

Edited by datiswous
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Sotha

      Today I started writing readables for my WIP mission.
      I wrote my usual text and then crammed it into AI and boom, high quality stuff comes out.
      I used to say that clipper is the mappers best friend, but now it seems it is more like "AI is the mappers best friend."
      · 2 replies
    • The Black Arrow

      Just saw further into 2.13 development, or is it 2.14? Anyway, proper Parallax Mapping...Absolutely fuck yes, please!
      · 2 replies
    • nbohr1more

      Happy Halloween! "Gem of Souls" is out:
       
      Psst, someone let Darkfate know...
      · 1 reply
    • The Black Arrow

      Is there a thread for "Moving Day 2: Look Who's Moving Now"? If not, could someone hint me on what is Dick's birthday? This mission is quite enjoyable on its disturbing creepy implications.
      · 3 replies
    • nbohr1more

      Can we get a few more players to try out "You Only Fly Thrice" and "Pinnacle: A Test of Talents" ? ( 15yr contest missions ). It would be nice to conclude contest voting in time for Moddb award season if possible.
      · 2 replies
×
×
  • Create New...