Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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.

Posted
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?

Posted

The first thing I can think of would be to define a "wait" (and "wait_max") spawnarg similar to a "path_wait" node. This ensures that the AI spends the proper time at the path_anim node.

Posted

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

System: Mageia Linux Cauldron, aka Mageia 8

Posted
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 :)

Posted

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.

Posted

I'm messing around with the AI elemental to use as a base for making a AI firefly and it's getting along quite good, only I want to change the model, that is already a sphere, to a tiny sphere ... but how?

Is there a simple solution for that?

  • Like 1
Posted (edited)

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
Posted

@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?

Posted

@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
Posted
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?

Posted

@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.

Posted

@Geep

One way to find out : P

You could also getName via a script after the spawn and setKey name that_name, or trigger from script so you are sure you can use the reference name (you setName after the remove/spawn) ... I guess.

Posted

 

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
Posted (edited)

@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
Posted
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
Posted

@Geep

I was trying this remove spawn, but at spawn, from a callscriptfunction, the game freezes for a few seconds ...

void change()
{
entity guy1 = sys.spawn("atdm:ai_builder_guard");
guy1.setWorldOrigin('-148 294 0.0218201');
}

 

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...