Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
Village mayhem

Monks
Guest
Quote
2023-06-28 11:13:02

Hi andgameplay, ur game was fantastic, how did u plan the enemy system so that they did not group at one place when they are attacking Natasha


Monks
Guest
Quote
2023-06-28 11:13:30

Pls reply


VP
Guest
Quote
2023-06-28 12:48:16

A simple thing you can do is create a cube, turn cube's collision on, set cube's texture to transparent.png (to make it invisible).

Right-click on animated character (enemy), create animated node joint on the players head.

Download the "Follow" plugin from Neophytes and attach the follow action to the cube. Tell the cube to follow the animated node joint of the enemy.

Adjust the size of the cube to suit the enemy and make sure the collision elipsoid of the character does not collide with the cube.

Do the same for all your enemies.

When you run the game, the cubes will act as extra collision surface so the enemies (and any other "collide when moved" node) can no longer run through each other.

When you shoot at the enemies, the bullets will hit the cube now (instead of the animated enemy model),so you will need to make sure that the "on hit" actions are applied to the cube, not the enemy.

You can then use these cubes (or spheres, if you like) as a collision-box and a hit-box for animated characters.

If that's too complicated, you can also add "on proximity events" to each enemy so that, when the characters get too close to each other, they turn around or move away from each other. You can do this with the simple A.I. instructions in the coppercube API or, instead, you can use the "move AI in direction of node" plugin (also from neophyte website) to control which direction the players should walk in.


Monks
Guest
Quote
2023-06-28 14:12:01

Thanks a lot


Monks
Guest
Quote
2023-06-28 14:12:38

Where can I chat with you privately


VP
Guest
Quote
2023-06-28 14:22:37

You;re welcome- I don;t use private messaging. If you need something, I visit this forum a few times a day, or you can comment on my youtube or itch.io if you need to notify me. I'll do my best to help but I'm not an advanced user - I haven't learned to code yet, all my stuff is non-coding which isn;t always the best way to do things.


Monks
Guest
Quote
2023-06-28 14:50:07

Alright


andgameplay
Registered User
Quote
2023-06-28 19:44:12

Hi Monks! Thanks for play my game! The VP coments are great, he explain very good way for this and don't need to use code very simple!

In my game, I just used :


----------------------------------------------------
every few second do something ->

clone a scene node ->

change position of the clone ->

set the clone relative to a scene node, (scene node=Natasha)
----------------------------------------------------

So you set the parameters for the clones apper next of the player, a good idea is the clones apper behind your player, just for good stetic of the game.


Monks
Guest
Quote
2023-06-28 22:38:56

Tnkd, but how did u set up enemy ai


andgameplay
Registered User
Quote
2023-06-28 23:04:23

I set up the enemy ai with the behavior "Basic AI agressive" it's a scripted behavior that make the enemy atack in a continuous way. I used this behavior because the standard enemy behavior ai was bugging, the enemy was atacking and freezing.

In the basic ai behavior you put the action shoot and use a object how bullet.


Monks
Guest
Quote
2023-06-28 23:22:36

Tnks and did u use random patrol or sth else


andgameplay
Registered User
Quote
2023-06-29 01:32:33

Yes, random patrol to the enemies.


Monks
Guest
Quote
2023-06-29 02:31:51

Great, I'll chk it out, I also had a problem with the inbuilt game behaviour I'll try the aggressive one too


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