Jump to content
The Dark Mod Forums

The question is put AI follow us and obey our orders!


Capela

Recommended Posts

The SDK would need to provide some method of interacting with the following AI, i.e. looking straight at the AI and then hitting some prescribed keys to make the AI do stuff like stop or follow. Any orders other than that would prolly need scripting support.

Link to comment
Share on other sites

There's existing code to have one AI follow another, but that's all that happens. One follows the other. There's no code for interacting with the player, and no code for the player to give any orders to an AI.

 

This isn't to say that TDM will never have this functionality. It just doesn't have it atm.

Link to comment
Share on other sites

Can path_corners be created during gameplay through scripts?

 

For a simple follow-AI (for example someone being escorted) you could have something like a custom whistle item in the player's inventory, which when used runs a script that creates a new path_corner (and removes the old one) and assigns that as the target of the NPC being escorted.

Link to comment
Share on other sites

I don't know off-hand whether creating paths on the fly works, but there's an entity target_changetarget that can be used to switch an ai from one predefined path to another.

 

Thats a start, i realy dont wanna give some complex orders to AI, just a "wait here until im back".. "Folow me".. thats all. But I know its a complex thing to do, even if it seems so simple. I was think a script like an elevator..you click on button he goes from A..to..C and the B could stop the elevator any time you whant, get back and click again on A so it will move again to C. Well im in the begining of my mission, i will have alot of time to make some experimentals.

 

Sorry for my last post...it was late i was tired and i was i little child.

Link to comment
Share on other sites

Moving an AI between fixed points and getting them to wait around till told otherwise can certainly be done in DR with the path system, even when there's fairly complex logic involved. Getting an AI to follow you whereever or do stuff like go fetch an item that you put down somewhere random isn't supported by DR, but it *is* supported by scripting and there are plenty of people (including me) who help mappers with scripts so it's not compulsory to learn scripting if you want to use it.

 

You can make an AI frobbable if you wish to trigger a script or an action. I've done that a lot in test maps. It feels a bit impolite, but it works :)

Link to comment
Share on other sites

Alright, here you go. This is a super simple way to make an AI follow you on command with zero scripting required.

 

Download follow_test.map (save this in your darkmod/maps folder, dmap and play normally)

 

This is how it works:

 

The bell item targets a trigger_relay, which triggers the bell_sound attached to the player as well as the start_conversation node (atdm:target_startconversation).

 

The start_conversation triggers a conversation called Follow Player that you can view through Map > Conversations... in the Dark Radiant menu.

 

In the conversation I've set Orton, our poor hapless servant, as the only active actor and given him the following orders:

 

1. Say a line

2. Walk to the player (player1 entity)

3. Say a line

 

Now every time you ring the bell, that conversation is triggered and Orton will walk to you. To prevent him from wandering back to his starting spot once he reaches you, I've added an unreachable path_corner in a separate room that he is targetting.

  • Like 3
Link to comment
Share on other sites

That's one lovingly crafted test map. :smile:

 

One limitation seems to be that Orton only moves at all if he can pathfind his way to where you're standing. I tried standing on the table, at the far end from him, and ringing the bell, and instead of moving nearer he stayed where he was.

Edited by VanishedOne
  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Hello, it seems i cant interact with anything in the map, so i go console dmap---map it should work right?

 

 

Never mind....was just a question of position.....Well thats exactly what was on mind.

 

Thanks

Edited by Capela
Link to comment
Share on other sites

I'm more interested in why you want to do this? Sounds like an interesting idea.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I'm more interested in why you want to do this? Sounds like an interesting idea.

 

Well a mission can be what you want, steal a diamond, get back a book and receive a reward for that,...go for information...etc...In my case its a person. And for my mission i cant just say...hey there you are..end. If i say more it could compromise the mission :rolleyes:

Link to comment
Share on other sites

Well a mission can be what you want, steal a diamond, get back a book and receive a reward for that,...go for information...etc...In my case its a person. And for my mission i cant just say...hey there you are..end. If i say more it could compromise the mission :rolleyes:

 

Yes, missions so far that have involved finding a person mostly had that person dead or unconscious when finally found. Dead usually lead to a change in objectives. Unconscious usually meant carrying them out.

 

It would be nice to be able to lead them out.

 

In WS3: Cleighmoor ...

 

 

 

... I give the player the objective of letting someone out of jail, but in that case the guy simply runs off.

 

 

Link to comment
Share on other sites

  • 2 months later...

@grayman.. theres a proverb Portugese that say.... A word to the wise is sufficient.... is not the best translation but come on close. ^_^

Are you portuguese PT or BR? I'm portuguese PT and btw you did well even if instead of half a word you used full word. :D

 

This is what a more or less direct translation imo looks like.

 

Original "Para bom entendedor meia palavra basta" Direct Translation "For someone that understands well half a word is enough", but in this way it loses that "musicality" from the original and yours does have that.

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.
      · 6 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...