ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > CopperCube > Programming and Scripting
AI for melee combat behavior
Author Text

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


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Forum 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


   





Software: Ambiera Light Forum. © 2008-2015 Nikolaus Gebhardt, Ambiera e.U.