Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Maybe a bug in the game actor Ai enemy behavior?

andgameplay
Registered User
Quote
2023-06-14 03:36:10

Hello everyone, I'm creating a third-person game, but something strange is happening with the enemy's game actor behavior:

The enemy attacks the player only once when activated and after that it simply freezes, stops attacking and stops all animations!

I'm finding it strange because I've created games several times before and this has never happened!

I already checked the parameters, the tags, the colliders, but everything is ok!

I even created a new project from scratch to test and this error continues!

Does anyone have any ideas?


spicymilk
Registered User
Quote
2023-06-14 06:24:29

the built in AI behavior seems to have problems allot I would just recommend using another ai script if its what you need


VP
Guest
Quote
2023-06-14 07:49:22

Try increasing the "on activate" radius and then use the "restart behaviours of a scene node", for the "when attacks" box in the "game actor" behaviour. I think the scale of your scene/models will affect the relative activation-radius/shoot-range/responsiveness of the A.i. as it seems to work on distance between tagged nodes. You can use the "freeze scale" to keep the scale of all nodes the same - but youcant do that for animated models - you'd need to child them to a dummy node instead.

The way I set my A.i. is to use "every few seconds, If variable=??". Then I use "on proximity" to set the variable to control the enemy response/attack/move actions etc. I also use "Every few seconds, Shoot (from player, to centre of screen)" and then use the enemies "On Hit" to set variables - a quick way to make a line-of-sight/raycasting - so you can tell if the enemy can see the player orif the player is hidden from view/behind a wall.


wod
Registered User
Quote
2023-06-14 09:00:56

did you select collision off on the enemy model?


Guest
Guest
Quote
2023-06-14 11:13:45

@wod@eoh@coa

No offense buddy, but what's the point with your frequent nickname changes?


wod
Registered User
Quote
2023-06-14 12:24:25

i just like to change username sometimes.. sometimes i dont like the old username anymore


andgameplay
Registered User
Quote
2023-06-14 15:04:00

Hi everyone, thank you so much for the quick responses! I will try to use the tips mentioned here.

I just thought it was strange because this had never happened to me before.

VP, your idea is excellent, I will apply your suggestions on enemy behavior and what you mentioned about the scale of the models makes sense, the models that I created in Fuse are very big, I had to reduce their scale a lot, it must that's why this bug! Thank you so much!


VP
Guest
Quote
2023-06-14 15:42:36

You;re welcome buddy, hopefully it will work. If not, you could try adding a dummy node with the "game actor" behaviour attached, then child the model to that.

That would almost certainly fix it, but the only issue then is: I don't think the animations would change automatically any more (such as walk/run/die/attack etc) - you'd have to trigger them manually instead with "set animation" actions.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (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