Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Oh there was another little problem: I wanna have an AI rub his hands in front of the fireplace to warm up, like I've seen in other FM's. I noticed there's a path_anim which I assume is what I use, but where do I find the special animations?

Link to comment
Share on other sites

2 hours ago, Destined said:

The MD5 animation viewer (under the entity tab) lets you watch all animations that are available for a given entity. The one you are looking for is "idle_warmhands" or "idle_warmhands_low" depending on where the heat source is located.

That would be it. I made a path_anim targeted by a path_corner and which itself targets another path_corner, and gave it the key / value "anim idle_warmhands". When the guard reaches it however, the animation doesn't play... he also stays there forever and never proceeds to move on. What's causing it to fail?

Link to comment
Share on other sites

Link to comment
Share on other sites

In this screenshot is a hand warming network from siegeshop. The top nodes are path_wait for enter and exit of the rit network. the enter node points to the 5 path_corners, below. The path_corner nodes point to path_turn entities, which in turn target a single path_anim, with its values shown. That entity targets the path_wait entity which is the rit network exit node.

None of these entities have any wait_min or wait_max values set apart from the path_wait entities having "wait 0" set.

Screenshot_20201101_132345.jpg

  • Confused 1

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

4 hours ago, Dragofer said:

That sounds like the path_anim isn't being targeted by what should be the previous path node, causing the path to end.

lol, that was actually the case: The path_corner targeting it dropped it after I renamed it from path_wait to path_anim. Targeted it correctly again and now the animation works as intended :)

Link to comment
Share on other sites

Another little thing: Is there a type of entity that acts like a func_static but when triggered changes its model to another model definition? I could of course use a func_door there are things I don't feel like faking that way.

Edited by MirceaKitsune
Link to comment
Share on other sites

In the S/R-system there is a response effect "Set Model", which should do what you want; at least for a one-time change. Just set the response type to trigger and give it this effect. If you want to switch back to the old model, it would get more complex.

Link to comment
Share on other sites

So far the fire fly is working fine, but I'd like to have it do some thing's that it doesn't do now:

It should flee .. health = 5 health_critical = 30 .. but it doesn't flee. [Also I would like it to travel up and down more.=solved]  And it would be nice if it could start sitting or sleeping and only start moving when it's alerted.

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

@Destined , your comment about changing a model relates to a upcoming issue for me. I've got an AI character that will have 2 different bodies, though only 1 will be seen by the player at any time (think: a change of clothes). I could imagine one approach, elegant if it worked, would be to instantiate both versions, but swap their names somehow.

If there's a renaming method that works on AI, then I imagine you'd use the usual pattern:

rename(AI_2 --> AI_setaside); rename(AI_1 --> AI_2); rename (AI_setaside --> AI_1)

to avoid having 2 objects with the same name momentarily.

So, is it possible to rename an AI character in mid-game? If so would that break things?

I'm guessing that scripts that reference the AI name would be just fine, but that triggers that target the AI may break

Anyone tried this in the past?

Link to comment
Share on other sites

@STRUNK

I don't think there's any way around AIs using md5meshes as models, so you'll need to find a working combination of Blender and md5 importer/exporter script plugins to downscale the model. Since there are no animations, though, you can probably get away with making the AI invisible via a skin and binding a small static model (export the elemental as a model inside DR).

@Geep

There's the setName script command. But if it's like a change of clothes, then wouldn't setSkin be a better fit in this case?

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Destined said:

In the S/R-system there is a response effect "Set Model", which should do what you want; at least for a one-time change. Just set the response type to trigger and give it this effect. If you want to switch back to the old model, it would get more complex.

Sounds good, I don't need to change it back. What's the simplest and shortest way to write a S/R effect that activates once an objective is completed?

Link to comment
Share on other sites

@MirceaKitsune

I tried the set model s/r and I kept getting black boxes so I tried "remove" and "spawn entity" and that works.

Select the entity tht must change upon a trigger from the objective and give it trigger as stim and trigger as response, then add effect remove, and select the object that you are setting the s/r on, and then add an other effect spawn entity. There you set the entity that it must become, and fill in the origin. For the origin just place th entity in the right place and copy the coördinates.

Link to comment
Share on other sites

 

2 hours ago, Geep said:

@Destined , your comment about changing a model relates to a upcoming issue for me. I've got an AI character that will have 2 different bodies, though only 1 will be seen by the player at any time (think: a change of clothes). I could imagine one approach, elegant if it worked, would be to instantiate both versions, but swap their names somehow.

If there's a renaming method that works on AI, then I imagine you'd use the usual pattern:

rename(AI_2 --> AI_setaside); rename(AI_1 --> AI_2); rename (AI_setaside --> AI_1)

to avoid having 2 objects with the same name momentarily.

So, is it possible to rename an AI character in mid-game? If so would that break things?

I'm guessing that scripts that reference the AI name would be just fine, but that triggers that target the AI may break

Anyone tried this in the past?

Not 100% sure, what your setup should be, but why does the AI need to have the same name? I don't think that there is a way for the player to get the name of an AI (although I am not sure if it is displayed, when the unconcious/dead body gets shouldered, but in that case, I believe you can define the name and it does not have to be unique). If the AI should be able to switch back and forth between both forms, I would go with a teleport method: create two separate AIs, the "original" in the map and the "switched" in a blackbox room somewhere else. When the body change should occur, just teleport the "switched" to the position of the "original" and the "original" into the blackbox. Vice versa, when the AI should change back.

2 hours ago, MirceaKitsune said:

Sounds good, I don't need to change it back. What's the simplest and shortest way to write a S/R effect that activates once an objective is completed?

The simplest way would be: create your entity. In the entity tab got to "Stim/Response...". There you go to the Response tab, choose Trigger as the response type, in the right window RMB and "Add New Effect", select Set Model with target: _SELF and Model: the model you want to have.

In order to have an objective trigger this, I would create a Trigger entity with the entity you want to chang as target and write this Trigger entity into the "Completion Target" field of the objective. I hope I did not forget anything.

55 minutes ago, STRUNK said:

@MirceaKitsune

I tried the set model s/r and I kept getting black boxes so I tried "remove" and "spawn entity" and that works.

Select the entity tht must change upon a trigger from the objective and give it trigger as stim and trigger as response, then add effect remove, and select the object that you are setting the s/r on, and then add an other effect spawn entity. There you set the entity that it must become, and fill in the origin. For the origin just place th entity in the right place and copy the coördinates.

This is strange. The black box usually means that the model could not be found. Are you sure you put in the model path correctly?

The trigger stim is not necessary, because this means that the entity emits a trigger stim.

  • Thanks 1
Link to comment
Share on other sites

@Destined

Aha .. in the s/r editor it says to set the name of the model, not the path, but that way it works indeed. Although if the new model should be an entity like loot, and not a static model the remove/spawn trick would do the trick : )

About the stim I didn't know but that's good to know also.

Edited by STRUNK
Link to comment
Share on other sites

2 minutes ago, STRUNK said:

@Destined

Aha .. in the s/r editor it says to set the name of the model, not the path, but that way it works indeed. Although if the new model should be an entity like loot, and not a static model the remove/spawn trick would do the trick : )

About the stim I didn't know but that's good to know also.

This is correct. It depends on what you want to do. But in this case it sounded like something purely cosmetic.

The stim thing is something I also did wrong for some time, until it was explained to me. Good to know that I am not the only one that misinterpreted it 😉

  • Like 1
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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...