Jump to content
The Dark Mod Forums

Assigning new targets to AI


grayman

Recommended Posts

In the Objectives Wiki, the final section, "Using Objectives Creatively", it says this:

 

"And when that gets satisfied, the objective has completion target gopatrol_start, which is an ordinary trigger_once. This in turn targets a func_static which gives all the cardgamers new targets to their patrol routes."

 

I've used target_setkeyval to accomplish this in the past, but I wondered how you'd use a general func_static to do the same.

 

Thanks.

Link to comment
Share on other sites

I have two card players that I want to start patrolling when alerted. This is the exact circumstance described in "using Objectives Creatively".

 

Even using target_setkeyval to reset "target" on each card player to a path_corner doesn't get them to start patrolling when they come off their alert.

 

I've tried both the "sitting" spawnarg on the AI, and targeting them to a path_sit. Both fail.

 

I know the objectives are being satisfied, and that each AI is receiving a reset of "target".

 

But each sits down when he comes off alert, ignoring his new target.

 

If anyone's gotten this to work, I'd like to hear how.

 

Thanks.

Link to comment
Share on other sites

Can't you use alert-only pathnodes?

 

That is the better way.

 

Put the AI near the chairs and use "sitting 1"

Then give the AI the target to the path chain he should be marching when alert. Put the first node into "idle_alert_only 1" or idle_alert, cannot remember the exact spawnarg.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Put the AI near the chairs and use "sitting 1"

Then give the AI the target to the path chain he should be marching when alert. Put the first node into "idle_alert_only 1" or idle_alert, cannot remember the exact spawnarg.

 

Doesn't work. The AI return to their spawn point and sit back down again.

 

Setup:

 

Two card-players marked "sitting". Each is targetted to his own alert_idle_only path_corner to start an alerted patrol.

 

They sit and play. A noisemaker alerts them and they search for a while, starting at alert level 4. When they calm down back to alert level 0, they return to their chairs and sit again.

 

So we don't know who wrote "This works beautifully." on the Objectives wiki page?

Link to comment
Share on other sites

More info...

 

I was using a noisemaker to upset my card players. That alone won't get them to start using an alert_idle_only path_corner. It has to be a dead body or a few other things.

 

So I killed a guard that was standing nearby. One of the card players saw this, searched a bit, then started his patrol. Good.

 

The other guard searched, but didn't see the body himself. The first guard warned the second about the dead body, but the message wasn't received, so the second guard sat back down at the table.

 

Since I want them to start patrolling once they get up from the table and search, regardless of cause, I can't rely on the use of alert_idle_only.

Link to comment
Share on other sites

So we don't know who wrote "This works beautifully." on the Objectives wiki page?

 

Ehm.. It sounds like me.. Check out knightons manor. I have set up that there. Pay attention to the card players in the servants quarters, left of the starting position ("cardgamer1" and his pals). Check the objectives cardgamer_anxietyX. Also check the objective completion target "gopatrolstart". It is a trigger_once nearby the players. It triggers a mattress with stim response system that gives AI new targets.

 

It works, I know it. At least it did when I made Knightons.

 

Since I want them to start patrolling once they get up from the table and search, regardless of cause, I can't rely on the use of alert_idle_only.

 

Oh, I never realized that. Then, if you reverse engineer knightons manor, you will succeed. You can even set the minimum alert level.

 

This provokes a few questions: what is the alert level that makes the AI toss their cards? I'm making some card players that are in a guardhouse. I'd like to have an AI that goes there on his idle_alert paths if he sees the player. What alert level does the guardhouse guards get from another AI that is walking idle_alert paths? Obviously, I want the idle_alert AI to go and tell the idle AI's that there is trouble and the idle AI would then start roaming their own paths to have some extra guards around.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

That alone won't get them to start using an alert_idle_only path_corner. It has to be a dead body or a few other things.

 

Hmm, we might want to think about adding that to the list.

 

o we don't know who wrote "This works beautifully." on the Objectives wiki page?

 

I thought it was Sotha, actually.

 

 

Just throwing this out, but could you use some kind of teleportation system? Put a trigger around the table that teleports in a new set of pathnodes? If the AI target a pathnode that's not there, they'll just stay seated, I think. But if they are alerted enough to get up and move, they'll hit the trigger, and then when they relax, they should go to the pathnode that's now teleported in.

Link to comment
Share on other sites

It works, I know it. At least it did when I made Knightons.

 

I even checked. The setup I describbled does still work. Even with some hilarious details. I had set the alert level to 3 which gives the AI new targets. I tried to get the minimal alert possible and only one of the players looked for me. Once he relaxed he went to the new path. One guy who didn't even hear me, never tossed the cards. Since alerting one of the men put everyone to new paths, he started patrolling, still having the cards in his hands. ^_^

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Then, if you reverse engineer knightons manor, you will succeed. You can even set the minimum alert level.

 

I copied the mattress from KM, dropped it into my map, and adjusted its spawnargs to fit my scene.

 

The card players returned to their seats after they were finished searching.

 

I'm going to play KM and see how the players there behave.

 

It could be one of a couple things:

 

1. It matters how they're alerted. In KM, I imagine it's with a player sighting. In my map, I'm trying to put them on patrol after a noisemaker. I'll try notarget/noisemaker in KM and see if that changes the behavior.

2. A bug has been introduced into TDM since KM first came out.

 

Back l8r.

Link to comment
Share on other sites

A notarget/noisemaker pulls the KM guards from the card table. After searching, one comes back and stands next to the table and the other two start patrolling.

 

Though I thought I'd matched my scene to KM, apparently something's still missing.

Link to comment
Share on other sites

I switched my map to 1.07 and made myself visible. The guards went on patrol when their search was over.

 

Which was hilarious. For testing, I have everyone in the household on team 0 with me. I changed the cardplayers to team 1 so they'd see me as an enemy. During their search and once on patrol, they slaughtered every unarmed servant they came across, since I'd left all of them on team 0.

 

I'll have to pull the card scene out of the map for further testing to see why the guards react differently to noisemakers and enemy sightings. The only difference I've encountered is the alert_idle_only flag, but I'm no longer using that. KM doesn't use it.

 

Ah well. Another "this should be easy to do" moment that's stretching into a full day's work.

Link to comment
Share on other sites

@Sotha,

 

When you get a chance, could you finish the instructions on the Objectives page? Someone trying to implement setting new targets is going to hit the word "func_static" and not know what to do. That's what happened to me. We need to know how to make the func_static add spawnargs.

 

Thanks.

Link to comment
Share on other sites

@Sotha,

 

When you get a chance, could you finish the instructions on the Objectives page? Someone trying to implement setting new targets is going to hit the word "func_static" and not know what to do. That's what happened to me. We need to know how to make the func_static add spawnargs.

 

Thanks.

 

Yeppers, done. I hope it makes now more sense.

 

Ah well. Another "this should be easy to do" moment that's stretching into a full day's work.

 

Heh.. I hear you. I wanted to have a gauge dial arrow, which rotates more than 220 degrees. A simple and fast task. It turns out, it seems like impossible to make and I've tried different setups, based on atdm:mover_door. For some reason, the dial arrow does not rotate the full amount, but only something like 180 degrees or so. I have no idea why. Annoyance.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

This finally started working for noisemakers. The card players start patrolling after being alerted.

 

Thanks for the help.

 

@Sotha, after copying in your mattress so I was using the exact same objects as KM, I didn't want to test fate by switching the trigger response to another func_static. So my guys now have a mattress and pillow in their mess hall where they can sack out when needed. You can have a good laugh when you finally see it; you'll know why it's there. ;)

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

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 replies
×
×
  • Create New...