ai problem

w and x to rotate, a to fire and y to go forwards.The enemy is supposed to regain their health when it gets to left or right object.But when i move
it stops regaining it’s health.What could be causing that you think?I am using a navmesh and the steering actuators for part of my ai.

Attachments

new error.blend (1.55 MB)

I don’t get why you need it, but I would use a invisible object collision to do(add health when touching) or not do (add health all the time unless touching)

or use python and X’s or Y’s etc

TargetX=CenterBoundry.worldPosition.x
own.worldPosition.x and own.worldPosition.y to copy to
own["X’]=own.worldPosition.X
if distance X-X1 greater then Max ----------------------------------add to transation

so you can do it with logic or python or a collision :slight_smile:

I would NOT use a near sensor, use a vision cone, as near sensors use much more resources then two colliding planes

A blend example would be nice?I intend to add other things to my game.This ai will be part of my game.I probably will use it other games as well.

for the vision cone or the collision with property in a invisible ghost cube?

and I did not mean anything negative about how I didn’t get why you need it bit… I was referring to the part about the ship healing, I just don’t understand the game play mechanic yet,

attached is a .blend for the colliding with an invisible object giving health,
hit space to destroy the platform that the cube lands on, moving the “health receiver”
out of the "Receive health Zone "

Attachments

ExampleCollide.blend (482 KB)

They are robots that hoover above the ground actually.You see your player robot from up in the air and also the enemy robots.I am going to make a maze for the robots that you can explore.When i am done.The robots sort of act like people in that they dont want to be destroyed so they heal up when they hide.Why they look like ships that is all i can think of for the design.Really they have eyeballs that hover under a glass for eyes on their tops.

Cool, did I solve your issue?

Do you need some help with vision cones?

have you heard of A*?

It seems like neither near sensor or collision sensor are working properly.Maybe it would work better with a python script.It usually works that way for me.when i copy paste other peoples scripts.I dont know how to be a good python programmer yet.I will need some help with that.

I use collision for the vision cones, but they are several diamond shapes arrayed @ 22.5 offset from each other

this uses less then a “cone” but gets more collisions inside the volume,

I think a lot less faces as well…

Attachments

Detector.blend (472 KB)


Ok, here is a working ai

it is Creative Commons, Share modify etc, as long as you name me :):slight_smile:

Attachments

DetectorAi.blend (498 KB)

It worked but lets see if it works tommorrow.It usually stops working the next day.That is why i think a python solution would be better.

I “think”…

it is the fact that you are not setting the relations right, the object HAS to be a sensor, or dynamic/rigid body to effectively collide with a Ghost/static actor

I think you just need to tinker/play more :slight_smile:

a object bound to another by parent can not collide, at least I think, the parent does…