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

Registered User
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:

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

//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.

2017-05-18 03:09:03

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

Registered User
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 ?

Registered User
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.

Registered User
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 !

2017-10-03 11:58:24

there is an AI behavior that improves all on

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Internat?onal" (you are not logged in)




Forum Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



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