Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
AI for melee combat behavior

cadddr
Registered User
Quote
2017-05-18 01:47:12

Hi!, today I created a melee combat behavior for AI in Coppercube

- AI will follow the player until it reaches melee range then attack the player
- supports animation and invoke scripts when spawning, attacking and dieing. (read the header for more details)


the script is avaliable here: https://github.com/creamcast/coppercube_scripts/blob/master/behavior_meleeAI.js

feel free to use or improve it, please don't forget to share the results.

//Usage
//1.Create an animated Entity
//2.Set 'AI for melee combat' as a behavior, set parameters as required.
//3.To give AI health: Set a 'Game Actor with Health' behavior, then set the mode to 'This is a Player', leave parameters as default other than the health
//4.Set a 'Collide when moved' behaviour if nesscary.


tim12345
Guest
Quote
2017-05-18 03:09:03

wow really cool... works great, cadddr! thanks for sharing!


bracer
Registered User
Quote
2017-05-18 16:01:48

Caddr, first of all well done !

Such perfect timing, just wonderful that you just magically appeared with this newly programmed action that could help me !

Sorry to trouble you, but would your newly programmed action resolve these issues ?
🔎︎

https://www.youtube.com/watch?v=...


cadddr
Registered User
Quote
2017-05-18 17:53:40

hey bracer, yea... the default AI script is really buggy. It needs a major revamp.

In the meantime you can set the melee range for this melee script to something larger (like 50) so the AI will shoot from a distance. It doesn't support pathfinding or patrolling yet.. but at least its more aggressive than the default AI.

btw I made some fixes to the melee script so redownload if you need it.


bracer
Registered User
Quote
2017-05-18 18:02:04

Hey caddr, thanks for the heads up.

Since as you have mentioned you script doesn't do patrol yet and as you can see, is a huge part of my scene, I cannot use it at the moment, but please keep doing what you are doing, I am sure people will find it useful !


Zoo
Guest
Quote
2017-10-03 11:58:24

there is an AI behavior that improves all on http://marshtownmadness.com


IsaacSlemkoDev
Guest
Quote
2020-03-21 01:47:50

Thank you so much, very helpful for my 3d zombie first person shooter project. Default AI behavior needs revamp :P


rruan
Registered User
Quote
2023-11-06 17:19:06

cadddr wrote:
Hi!, today I created a melee combat behavior for AI in Coppercube

- AI will follow the player until it reaches melee range then attack the player
- supports animation and invoke scripts when spawning, attacking and dieing. (read the header for more details)


the script is avaliable here: https://github.com/creamcast/coppercube_scripts/blob/master/behavior_meleeAI.js

feel free to use or improve it, please don't forget to share the results.

//Usage
//1.Create an animated Entity
//2.Set 'AI for melee combat' as a behavior, set parameters as required.
//3.To give AI health: Set a 'Game Actor with Health' behavior, then set the mode to 'This is a Player', leave parameters as default other than the health
//4.Set a 'Collide when moved' behaviour if nesscary.



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inte?national" (you are not logged in)


Text:

 

  

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


   






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