ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Announcements and Showcase
forum topic indicator AI + 3rd person player
person icon
sven
Registered User
Quote
2025-03-02 19:25:37

Similar player controller that my K52 project have.(some of you asked it so here it is-(cant share AI script (too messy) that was included with K52 but this script is probably even better)
Nothing more than fps camera that is moving with 3rd person character.

AI is similar as i have shared already but modified a lot..and will be modified a lot more..for zombies and monsters this AI is perfect.-i have ideas to make good soldier ai also with some tactics-cover nodes and other stuff that makes AI look smarter than it is.

I share it at current state so you can have fun with it.
Download:
https://5v3n.itch.io/coppercube-...


Currently AI doesnt respect difference between waypoints Y axis.. so if you make path to the roofs and ai sees you on ground it keeps bumping to the wall and may or may not find a route to the player.. this can be fixed and i did it already but i figure out better solution for that.

person icon
Monks
Guest
Quote
2025-03-02 22:45:44

Thank you sven, so for the critical hit parameter in enemy ai, how does it work

person icon
sven
Registered User
Quote
2025-03-02 23:40:06

Monks wrote:
Thank you sven, so for the critical hit parameter in enemy ai, how does it work


this function not enabled currently..
i will rethink how to make it..
anyways how it will work: if damageval + random damage (if enabled) reaches top level (that set) then it will affect player.. for example camera shake or just freezes player -or for example can be made player movement or accurary value will get affected...-lets player know that player dealth with serious damage..
i am working on sample game with those scripts and i will add stuff that will fit into this game..

person icon
Monks
Guest
Quote
2025-03-03 09:17:51

Nice work, so what about the arrays push and array parameter in svcAI .js

person icon
sven
Registered User
Quote
2025-03-03 09:59:28

Monks wrote:
Nice work, so what about the arrays push and array parameter in svcAI .js



Range is AI range that it tries to keep free-not allow other AI to intrude it.
Push force is force it uses to push away other AI..
(you can try to move player into AI..look what happens.. it wont allow it (should not)..(player has default pforce 0.1 -try 0.5 and look what changes)
player values are coded in script you can change them there)

NB make sure that range is not bigger than attack range -otherwise AI keeps try to move at attack position but keeps pushed away)

So usually if one AI has smaller attack range then its good idea to give him higher push force so he can push tru other AIs that has bigger attack range and may stand in front of him. ( thats the idea anyways and kinda works )

This separator script comes with cost of takeing a lot of frame time..if you have a lot of AIs..new version of it is twice or more faster and can handle more AIs.

person icon
Monks
Guest
Quote
2025-03-03 10:40:16

Oh nice, so when is the newer version coming out

person icon
sven
Registered User
Quote
2025-03-03 10:44:33

Monks wrote:
Oh nice, so when is the newer version coming out


I think old one is good enaught for now- new version i keep for myself until i keep modifying it.

person icon
Monks
Guest
Quote
2025-03-03 10:48:29

Oh ok, yeah you're right, and last but not the least how can I generate the path Nodes and assign enemy ai to it

person icon
sven
Registered User
Quote
2025-03-03 11:15:21

Monks wrote:
Oh ok, yeah you're right, and last but not the least how can I generate the path Nodes and assign enemy ai to it



You cant generate pathnodes you need to place them into world manually- you can generate connections between them with plugin..

Pathnode is whatever you place into PathNodes folder-they are considered as pathnodes.
(i use cube 's there -you can use cones if you want or whatever 3d model-make sure its collision is off-no need to collide with them)

First make PathNodes folder visible and you see how i placed them to world..
You can move them or delete them-whatever you need to do..make sure they are on ground.
(after edit make sure to use plugin to generate connections)

Now if you want to make your own world then delete those cubes that are in that folder.-but keep one so you can just klick and clone and place it into world.

Pathnodes names are not important they will be overwritten by plugin so whatever theyr name by cloneing will be it will be changed.

Just for testing make simple path..
Add 4 pathnodes to the world..

then use my plugin to generate connections between them.. then you see how it works.
Connections will be created as a node svcPATH
(later you can just make it invisibe and no lines are visible in game)

You can just delete any of those connections (lines) -that you think are not needed.
just klick and delete..and this connection will be erased..


AI automatically looks for pathnodes and uses its connections to move from location to location so no need to assign.


NB plugin will skip pathnodes that are 300 units away from each other and 30 units away by Y axis..you can change those values as you need in plugin script.. as explained in info.png that comes with download.
So experiment with it and find best values for your world there.

person icon
Monks
Guest
Quote
2025-03-03 11:57:24

Thanks sven

person icon
andgameplay
Registered User
Quote
2025-03-06 17:59:04

Really thanks for the script, is very good!


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |