Python Track To and Steering Track to selection.

Hmm, you’d need to do this manually using the first example, and disable the tracking on the steering actuator in order to acheive this.

What do you mean i still want to use ray cast detour?Could you explain
that better or post a blend.

Lets go about this a different way then.
A has message sensor on it telling the enemy to go to B with message sensor on it which tells the enemy to go back to A only if it does not receive a message from c telling it to raycast detour to player.When the player encounters other A’s,B’s with message senors along with random sensors on them the random sensors choose to turn on randomly causing the enemy to do what the previous message said.I would like to program them when they become random also.Could your program be modified to do this?

Wow!
I’m slightly confused at this point

Its instructions on what i want your raycast detour script to do.What dont you understand?

Never mind i have found another way to do it with logic bricks.But it
took me a while.

how to track only using Z_axys? (like a map-compass)

Check it out :smiley:


import bge



def main():


    cont = bge.logic.getCurrentController()
    
    own = cont.owner


    if 'Store' not in own:
        
        scene=bge.logic.getCurrentScene()
        
        own['Store'] = scene.objects['Y_target']
        own['Store2']= scene.objects['Z_target']
        
    else:
        print("Fire")
        Y=own['Store']
        Z= own['Store2']
        Vect1=own.getVectTo(Y)
        Vect2=own.getVectTo(Z)
        own.alignAxisToVect(Vect1[1],1,.5)
        own.alignAxisToVect(Vect2[1],2,1)
main()

Attachments

TheTracken.blend (448 KB)

ty so much ^^

done ^-^ how i can set Z_target as a nearest property target?

/solved :slight_smile: