Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue
 Share

Recommended Posts

I'm trying to help another mapper with an issue, and since this is something I may use personally in some circumstances I wanted to know if it's possible. Can you place an animated model on a map but have it show a static frame from a specific animation? There exists func_animate which I played with a couple of times, but using it this way would need to things: First a way to stop the animation, possibly by setting its speed to 0... also a way to pick which frame you want, possibly by choosing a custom starting frame. Does that entity or any other currently allow this?

Link to comment
Share on other sites

I vaguely remember a spawnarg in the func_animate entityDef that might be useful. Otherwise an approach is to copy the idle .md5animation and replace its 1 frame (joint origins and angles) with the desired frame from the desired anim. You'll need to add that anim to the model's modelDef (or just overwrite an existing .md5animation).

  • Like 1
Link to comment
Share on other sites

On 12/28/2022 at 11:39 PM, MirceaKitsune said:

I'm trying to help another mapper with an issue, and since this is something I may use personally in some circumstances I wanted to know if it's possible. Can you place an animated model on a map but have it show a static frame from a specific animation? There exists func_animate which I played with a couple of times, but using it this way would need to things: First a way to stop the animation, possibly by setting its speed to 0... also a way to pick which frame you want, possibly by choosing a custom starting frame. Does that entity or any other currently allow this?

You could try to play around with frame commands: https://wiki.thedarkmod.com/index.php?title=Frame_commands

These commands require you to alter the animation files (so you should create a copy and rename it for this project). Unfortunately, the pause command is listed as "not used yet", but maybe you can circumvent that through a trigger, which then pauses the animation via a script command. Maybe this helps you.

Link to comment
Share on other sites

  • 2 weeks later...

If you knock out an ai and he jumps up and instantly dies, is there a usual reason for this happening and how to fix this? I saw this behaviour while testing Deadeye (during beta) and now I see it happening in another mission.

Edited by datiswous
Link to comment
Share on other sites

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. 

  • Like 1
Link to comment
Share on other sites

The issue as far as I understand it, is that when you KO the AI that's sitting/sleeping, if they are even a little bit into the chair/bed, they'll flail about and physics takes over and the rapid movement can cause damage to the AI and they die from it.

 

  • Thanks 1

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Greetings again, all.

I have a situation with a switched electric light and an AI not relighting it when switched off.

The switch is on the wall about mid-player height.

The light is atdm:sphere_brass_celiing with spawnarg shouldBeOn=1.

The AI has:

canOperateSwitchLights=1, chanceNoticeLight=1, chanceOperateSwitchLights=1

... to seemingly ensure it will go and flip the light back on.

However, when I switch off the light, the AI comments on the dark but walks to a nearby door and opens it, not the light switch.

I have tried moving the switch ALLLLLL the way across the room and the AI still favors the door.

Ideas on what might be the issue?

Much appreciated.

Clint

 

 

 

Link to comment
Share on other sites

When this happened to me, it was because the dumdum was trying to flip the back of the switch and was walking through a bunch of rooms to get to its back side.

Also, are you using atdm:relight_position entities to tell the guard where the light switch is? They struggle to figure it out otherwise.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

9 hours ago, thebigh said:

...the dumdum was trying to flip the back of the switch...

Thanks for the great suggestion.  This seems to be why the AI was walking through the door.  The relight_position did not help this particular situation.

So I experimented:

1)  by converting the wall the switch is on to func_static... the ai found the switch properly.

2)  by setting the wall to worldspawn and moving the orign of the swtich lever just outside of the wall dimension... the ai found the switch properly.

I am using the prefab flip switch {prefabs}\Switches\small_wall_switch.pfb.  It looks like when the switch and plate is flush against a worldspawn brush wall, the origin of the switch lever is inside the wall and throws off the AI from the relight.  Does this make sense to the techno-experts?  A switch origin cannot be inside a worldspawn brush and be used for relight?

For now, I crafted a switch plate replacement that pulls the lever out of the wall dimension.

I added the relight_position, too, to be thorough.

So far, all of this seems to work now.  The intended AI is much less of a dumdum, now.

Thanks again.

Clint

 

Edited by cvlw
  • Like 1
Link to comment
Share on other sites

On 6/28/2021 at 9:34 AM, stgatilov said:
On 6/28/2021 at 2:51 AM, MirceaKitsune said:

All missions have an intro, defined within fm/xdata/suffixed.xd file as maps/fm/mission_briefing. I would however also like to have an outro / mission_debriefing, same system / graphics / etc just shown after the mission is over just like the default is shown when it begins. The first question would be if there's any builtin system for such

There is no way to do it in main menu GUI. Playing a debriefing video is the only option.

Is this still the case? Seems kind of limiting. I see in multiple missions, outro video's that look like slideshows and could be done in a Timed Flowing Briefing and would probably look better.

Edit: I guess maybe I could use a full screen slide in mid game right before mission end. Seems really complicated though..

Edited by datiswous
Link to comment
Share on other sites

Maybe what's possible is make it a campaign technically, but at the start of the mission end it immediately, but before that you can have a mission intro, which looks like an outro. Sounds hackish and there's a (very short) loading screen for the second map I assume.

I wonder if it's possible to skip the end of mission score screen.

Edited by datiswous
  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

22 minutes ago, Geep said:

Assuming what you're trying to call is tdm_ai_elemental::onDeath() at tdm_ai_monster_elemental.script(141), then probably you should cast to tdm_ai_elemental, not atdm:ai_elemental. The parsing is choking on the ":".

Excellent, that works great!

 

void testDeathScript(entity ele)
{
    tdm_ai_elemental elemental = ele;
    elemental.onDeath();
}


 

Edited by joebarnin
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.

 Share


  • Recent Status Updates

    • snatcher

      TDM Modpack v2.6 released!
      · 0 replies
    • peter_spy

      Perhaps an unpopular opinion: TDM team might benefit from someone with actual QA experience; someone with naturally and professionally developed curiosity, who is interested in how and why things work, how they break At least to me it's kind of mind-boggling how untested some rather important features are (first the absence alert feature for items, now the rope +body carry behavior).
      · 4 replies
    • nbohr1more

      The Dark Mod is hosting an Ask Me Anything thread on the PC Gaming reddit forum:  https://www.reddit.com/r/pcgaming/comments/10nfcwj/hello_we_are_the_international_development_team/
      Feel free to join the discussion there
      · 2 replies
    • stgatilov

      Bumped into an interesting piece of wisdom called Hyrum's Law:
      With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.
      · 5 replies
    • The Black Arrow

      I love playing The Dark Mod when it's cold in my place. Bonus points when it's a bit (or even very) dark and it's raining, too.
      · 2 replies
×
×
  • Create New...