AI example?

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
User avatar
arfur9
Posts: 76
Joined: 2017-02-25, 18:57
Location: uk
Contact:

AI example?

Post by arfur9 » 2017-06-22, 10:20

I was wondering if anyone had done an AI script/level example
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: AI example?

Post by Carsten » 2017-06-22, 21:01

Have you had a look at the "company bots" (Trinity following the player) in the TechDemo map?

These are very simple examples of AI. The "I" in "AI" is certainly exaggerated, but at least it shows the basics how AIs can be implemented. ;-)

Btw., I just realize that the "company bots" in the TechDemo map are the only ones that we have. If you want me to, I can add another example to one of the smaller maps where it would be easier accessible.
Best regards,
Carsten
User avatar
arfur9
Posts: 76
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: AI example?

Post by arfur9 » 2017-06-23, 10:40

I never noticed her following me! But there is so much missing in the techdemo, doors, weapons I don't look at it much

A smaller example would be great :)
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: AI example?

Post by Carsten » 2017-06-24, 10:18

Ok, I'll make one today or tomorrow!
Best regards,
Carsten
User avatar
arfur9
Posts: 76
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: AI example?

Post by arfur9 » 2017-06-24, 20:32

cool, thanks :)
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: AI example?

Post by Carsten » 2017-06-26, 10:47

I added an example bot to ReNoEcho yesterday, please see the latest commit in master.

Unfortunately, the script needs a review, as it ignores the settings in the entity's components and overrides them with its own. That used to be on purpose, as the script actually computes the values e.g. for the lantern, but in a future review, more flexibility is needed...

Still, it should show the basics of controlling a non-player character.
Best regards,
Carsten
User avatar
arfur9
Posts: 76
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: AI example?

Post by arfur9 » 2017-06-26, 15:35

Thanks, I'm having a little bit of a play
I reduced the distance to about 100 and he follows close enough to get onto lifts and he has no problem moving on the next level.. funny but true GameGuru can only do stairs with waypoints also npc can't handle bridges.. our little guy has no problems..
He can get stuck but if the distance is close enough for his line of sight he does ok
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests