Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

 

Thanks for the ideas, that is indeed what I was trying to do... "removing" the knockout part from a compound "do not kill" + "do not knockout more than X" objective. I have tried making it a success, but that fails the objective as a whole, so I think what I'll do is make sure the player can't take that objective on Expert instead, it makes sense anyway.

Take another look at : http://wiki.thedarkmod.com/index.php?title=Objectives_Editor

 

You'll have to split the KO and Kill part into different objectives and also note the part about the NOT checkbox, and "satisfied at start", which is critical for it to function (then you can make these objectives AND / or), but - if you look at how other missions have set up their objectives similar to yours - you might find that they are two separate objectives, not a single one. It might be more fun to have them invisible, but mention it in the briefing to, "avoid any unwanted attention or casualties), so they do not even appear in the list to complete the mission if the player picks up the hint in the briefing, but is informed that they have "failed" if they KO or kill.

 

To set it to an area location - you can have those objectives be cancelled on a trigger when entering the location, and then call them again (or new ones, if you want to keep the old score) on leaving - this might require some player pathing down some funnel to achieve, but for "proximity/opportunity" objectives - you can have these triggered by something such as opening the compound gate or from a script that has something like "scriptEvent float distanceTo(entity)" or "GetObjectiveComp" or something to reinstate/"pause", where the entity is the location. The rest of that script, though - probably have to ask Obs or someone - it's over my head.

 

I'd go with a few triggeronce and make entry and exit points one-way.

 

Also, thanks VanishedOne - I will take a look at the bug report, I think Greyman or Springheel told me that the way portalsky worked had changed with 2.06 and this was why things were not working for me in the same way.

I'll figure something out, or find another way to achieve something similar.

Share this post


Link to post
Share on other sites

post-37993-0-23174600-1555063855_thumb.jpg

 

I want the player to kill a spiderman through a trap door (c ) which releases a heavy barrel onto this obnoxious creature.

 

The barrel (a) is a moveable with 100 kg. I have surrounded the barrel with a no-draw fun_static brush (b ) which I gave the stim "kill" with the parameter "radius - use bounds". The brush has a bind property referring to the barrel.

 

When I open the "trap door" the barrel falls down and onto the spiderman, but nothing happens. It also looks really weird, as the barrel "floats" above the spiderman (surely because of its bounding box).

 

How can I solve this problem?

Edited by JackFarmer

Share this post


Link to post
Share on other sites

From a quick check in DR, it looks as though spiders (and probably AI in general) don't actually have a response to STIM_KILL by default. Try giving it one.


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

From a quick check in DR, it looks as though spiders (and probably AI in general) don't actually have a response to STIM_KILL by default. Try giving it one.

 

Hello VanishedOne,

 

I have added a response "kill/enttiy name" and that works. It looks a little bit strange, because the spiderman is not really hit by the barrel, but it works.

 

Thank you!

Edited by JackFarmer

Share this post


Link to post
Share on other sites

Hey I had a question. So I have a scenario where I have an NPC being teleported from black box into the map. However depending on what trigger_once the player uses, I need it to modify the starting path the NPC starts to patrol on. Still getting the hang of this method as my brain still works in Source Engine I/O direct entity events.

So yeah to recap I just need to be able to assign a different path depending on what trigger is targeting the NPC. Thanks!


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
Share on other sites

I'm no expert, but here's an idea, if you can't figure out a better solution. Create a separate NPC for each trigger_once (identical NPCs, but separate entities). Each NPC uses a unique patrol. Each trigger script kills off the other NPCs. That way you get a unique path depending on the trigger_once. Kludgy, but if you can't come up with a better way...

 

Hey I had a question. So I have a scenario where I have an NPC being teleported from black box into the map. However depending on what trigger_once the player uses, I need it to modify the starting path the NPC starts to patrol on. Still getting the hang of this method as my brain still works in Source Engine I/O direct entity events.

So yeah to recap I just need to be able to assign a different path depending on what trigger is targeting the NPC. Thanks!

 

Share this post


Link to post
Share on other sites

Hello Epi,

 

There is an entity called "atdm:target_changetarget"

 

Here is an example from the Wiki section "Conversations" on how to use it:

 

 

 

 

 

How to get AI to patrol after finishing a conversation

Sometimes you want AI to stay put until their conversation is triggered, and then start a regular patrol. Here's one way how(courtesy of grayman), see another below in Notes:

Guards Bob and Sam will have the conversation. Neither is targetted at any path_corners.

When the conversation is over, you want Bob to start patrolling, starting with path_corner_1.

When the conversation is over, you want Sam to start patrolling, starting with path_corner_2.

A player-activated trigger fires the entity that starts the conversation.

In the conversation, have these two steps at or near the end:

Trigger the entity StartBobPatrol

Trigger the entity StartSamPatrol

"StartBobPatrol" is an atdm:target_changetarget with these spawnargs:

"add" "path_corner_1" "target" "Bob"

"StartSamPatrol" is an atdm:target_changetarget with these spawnargs:

"add" "path_corner_2" "target" "Sam"

When the conversation ends, both guards will go their separate ways.

 

 

 

Edited by JackFarmer

Share this post


Link to post
Share on other sites

Alternatively, you could use the Stim/Response system. Add two entities (you could also use existing ones), target each with one trigger, and give it the Response effect "Add Target" that has the Arguments Entity (your AI) and Target (the respective path node). It may be that JackFarmer's solution is easier, depending on how familiar you are with the Stim/Response system.

Share this post


Link to post
Share on other sites

I'm getting some weird shadow things. Here is a video:

 

If I change the light to a simple ambient light, the shadows go away. I don't see any stray brush or entity that might be causing this, and also the way that it moves as the player walks is interesting. Does this look familiar to anyone?

Share this post


Link to post
Share on other sites

Thanks for the responses everyone!

 

Alternatively, you could use the Stim/Response system. Add two entities (you could also use existing ones), target each with one trigger, and give it the Response effect "Add Target" that has the Arguments Entity (your AI) and Target (the respective path node). It may be that JackFarmer's solution is easier, depending on how familiar you are with the Stim/Response system.

 

Interesting glitch I run into with stims. The stim method works great until I introduce another trigger targeting the NPC with an additional path. Currently I have them making an NPC either walk left or right depending on what trigger the player walks through. What's odd is that the right trigger works without a hitch and NPC walks on the right path upon triggered. However if I place an additional (left) trigger into the mix just labeling a different path, the right trigger breaks. Instead the NPC will always walk left as long as the left trigger volume is present. If I delete it, the right trigger works no problem again.

So the entity method Jack posted does work (even if it's a couple more steps) but I just wanted to figure out one last thing. What command can target the other trigger to kill it (kill and remove from stim don't actually work)? As of right now, left or right trigger are set to active at the same time. This introduces the problem that the NPC getting teleported in, gets re-teleported since the other trigger once is active. My goal was to issue a kill/remove command to the adjacent trigger volume to negate that problem. I only tried this method with stims so my question is what's a manual method for externally targeting a volume for deactivation/removal? My only guess is it's a stims bug (or possibly my lack in understanding) so I'm needing more options.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
Share on other sites

Thanks for the responses everyone!

 

 

Interesting glitch I run into with stims. The stim method works great until I introduce another trigger targeting the NPC with an additional path. Currently I have them making an NPC either walk left or right depending on what trigger the player walks through. What's odd is that the right trigger works without a hitch and NPC walks on the right path upon triggered. However if I place an additional (left) trigger into the mix just labeling a different path, the right trigger breaks. Instead the NPC will always walk left as long as the left trigger volume is present. If I delete it, the right trigger works no problem again.

 

So the entity method Jack posted does work (even if it's a couple more steps) but I just wanted to figure out one last thing. What command can target the other trigger to kill it (kill and remove from stim don't actually work)? As of right now, left or right trigger are set to active at the same time. This introduces the problem that the NPC getting teleported in, gets re-teleported since the other trigger once is active. My goal was to issue a kill/remove command to the adjacent trigger volume to negate that problem. I only tried this method with stims so my question is what's a manual method for externally targeting a volume for deactivation/removal? My only guess is it's a stims bug (or possibly my lack in understanding) so I'm needing more options.

The S/R method reacts on a specific Stim type. This means that any stim of that type will lead to a response. This is why you would need a different entity for each of the triggers and not have the triggers target the AI itself. I.e. you ahve two triggers. Both target the teleporter (not sure about the exact setup). One additionally targets an entity (other than the AI) with the Add target "left". The other targets another entity with Add target "right". This way you only have one triggered entity for each pathway.

By the way: Why do you need to set both targets? You could just have the left path as the regular route and the right path as the alternative. For the S/R this would mean that you have two triggers: both targeting the teleporter, but only one targeting the AI. When you give the AI the response (Trigger) with the effects "Add target (right path node)" and "Remove target (left path node)", it would also have the desired effect. At least, if I have got the setup right.

 

Is there an established mechanics for secret counter like in Thief 2?

Depending on the counter you need, I would either use a hidden objective or a script.

  • Like 1

Share this post


Link to post
Share on other sites

Is there an established mechanics for secret counter like in Thief 2?

Check out the training mission, there's a secret counter for the bottles.

  • Like 1

I always assumed I'd taste like boot leather.

 

Share this post


Link to post
Share on other sites

Check out the training mission, there's a secret counter for the bottles.

 

My missions also used a modified version of that script too if you want to use that for reference.

  • Like 1

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 1: Pearls and Swine                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 2: A Precarious Position              Langhorne Lodge

Chronicles of Skulduggery 3: Sacricide [WIP]

 

 

 

Share this post


Link to post
Share on other sites

Just got the alternate, "smart" paths worked out; bug free! Thanks again all, I'm sure I'll be back this way when I get some more gameplay nonsense to work out! ;)

  • Like 1

You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
Share on other sites

Is there a simple way to make the armoured guiards vulnerable to arrows, or make an arrow ignore the armour?
Was wanting to try out a few bodkins in addition to broadheads.

If it's messing with CVAR's, i'd rather not. Would prefer to keep it simple, but didn't spot anything yet that would allow it in an easy way.

Share this post


Link to post
Share on other sites

The spawnargs "damage_mult_*" give you the damage multiplier for various armour types. If you set all these to 1, the armour would have no effect. This is the simplest way, I could think of (it's only four or five spawnargs).

Share this post


Link to post
Share on other sites

Is there a script call to determine whether the player has a certain object in his inventory? Specifically, there are two objects involved. Player has Object1 in inventory, and they Use it. Object1 has a custom scriptobject defined, and the inventoryUse() method is called. All of that works fine. But within that method, I want to determine whether the player has Object2 in his inventory. I looked through the script reference, but so far I'm not seeing it.

Share this post


Link to post
Share on other sites

I would make Object2 not droppable and create a hidden objective to get Object2. With getObjectiveState you can check if the objective is met. If it is, Object2 has to be in the inventory. Maybe there is also a direct method, that I do not know, but it would be an option.

  • Like 1

Share this post


Link to post
Share on other sites

How to put away a quill?

 

I have an AI doing several things, including writing with a quill.

How can I achieve that the AI puts away the quill when not writing respectively doing other things?

 

post-37993-0-95512300-1556220616_thumb.jpg

 

 

How to mute the lute?

 

This one is driving me crazy.

 

post-37993-0-48210700-1556220856_thumb.jpg

 

I have added a location brush on the floor (A) in the entire room. When the lute player gets alerted, he drops the lute. I tried to mute the belonging speaker via the objective editor with if item with name "lute" is in location "A", then trigger entity func_remove xxx to remove the speaker. Does not work.

 

Then I tried objective: do alert lute player to level 5, then trigger entity func_remove xxx to remove the speaker. Does not work as well.

 

Is there a standard way to do that?

 

This is so strange, because I know that it definitely works with acquiring items, but I cannot reproduce it with other objectives.

Edited by JackFarmer

Share this post


Link to post
Share on other sites

re: the lute issue. I just did a few tests, and it looks like removing a speaker doesn't work - the sound keeps playing. I made a trigger_once that called a script, and the script called $myspeaker.remove(). Just like you noticed, that didn't work. The workaround I came up with was to just move the speaker to a far away 'blue room' (inaccessible to the player) using $myspeaker.setOrigin(). That effectively silences the speaker.

 

How to put away a quill?

 

I have an AI doing several things, including writing with a quill.

How can I achieve that the AI puts away the quill when not writing respectively doing other things?

 

attachicon.gifwrite_like_the_wind.jpg

 

 

How to mute the lute?

 

This one is driving me crazy.

 

attachicon.gifand_the_band_played_on.jpg

 

I have added a location brush on the floor (A) in the entire room. When the lute player gets alerted, he drops the lute. I tried to mute the belonging speaker via the objective editor with if item with name "lute" is in location "A", then trigger entity func_remove xxx to remove the speaker. Does not work.

 

Then I tried objective: do alert lute player to level 5, then trigger entity func_remove xxx to remove the speaker. Does not work as well.

 

Is there a standard way to do that?

 

This is so strange, because I know that it definitely works with acquiring items, but I cannot reproduce it with other objectives.

 

Share this post


Link to post
Share on other sites

Silencing the lute player is a problem that has been discussed before. If I remember correctly, it was origially meant for AI that cannot be alerted. See this thread for a discussion on missions that had the lute player for reference. Maybe you can find another discussion about silencing him in one of the mission threads. The idea with moving the speaker is quite good. I would probably go with that.

 

Regarding the quill: I thought that it is automatically attached and removed, when you play the writing animation, so it may be a bug. May also be that I am mistaken.

Share this post


Link to post
Share on other sites

Hello Joe & Destined,

 

Thank you for the link and tips.

 

Joe is right; with atdm:teleport I can "silence" the lute. Great victory! :) :)

 

This is really a very good idea. It might also be possible to teleport the speaker back into place when the AI just reaches an alarm level below 5 and resumes playing the lute after another change of the alert status. I will try this as well.

Share this post


Link to post
Share on other sites

if sound from lute is started via a trigger, then triggering the sound again should turn it off. if its a trigger once then use a trigger multiple.

Share this post


Link to post
Share on other sites

I remember having to make my lute player stone deaf and blind as a bat in my first mission to pull it off haha.

 

I'm now beta testing my newest mission, and we've run into a bug where the player spawns with two area maps. One called "map" and the one that I have defined in the game with an "atdm:map_of" entity. Does anybody know what the issue could be? I've looked through my entity list and it doesn't appear that I have two map_of entities in the editor. It's also not an item that can be bought in the store. I'm completely stumped on this one, even though it does sound kind of familiar like I had the same or similar problem with my first map. -_-


My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 1: Pearls and Swine                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 2: A Precarious Position              Langhorne Lodge

Chronicles of Skulduggery 3: Sacricide [WIP]

 

 

 

Share this post


Link to post
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.


×
×
  • Create New...