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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 3 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...