Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
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 |
||||
|
Pls reply |
||||
|
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. |
||||
|
Thanks a lot |
||||
|
Where can I chat with you privately |
||||
|
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. |
||||
|
Alright |
||||
|
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. |
||||
|
Tnkd, but how did u set up enemy ai |
||||
|
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. |
||||
|
Tnks and did u use random patrol or sth else |
||||
|
Yes, random patrol to the enemies. |
||||
|
Great, I'll chk it out, I also had a problem with the inbuilt game behaviour I'll try the aggressive one too |
|