Track to an object with a certain property?

Alright, new, related problem: check out comment #7

Hey, I’m wondering if its possible for an object track to another object once the latter receives a certain property by being a certain distance from the former…

I think I know how to do the second part: set up a “near” sensor, AND, and an “assign property” actuator, right?
But the first part (getting the one object to track towards the other object with the certain property) kinda stumps me as I can’t do it with just bricks (so I’m guessing it requires python)…

Anyone know how to do this or know a place I can learn how to…? :spin:

1 = Tracker

2 = Track Target

Assign the property to 1 when a near sensor is triggered by 2, and have a property sensor on 1 to trigger a track-to actuator when the property has the apropriate value.

I know it is tricky to put into words, but I think I have a good idea of what you are trying to do. So, hopefully that helped.

Also, don’t bother with python for something this simple, it is simpler to do it with logic bricks.

Eh, not exactly. I’d better explain it clearer, huh?
Say you have two cubes, right? When one of those is within a certain distance a character, it gets a certain property. I want the character to then be tracked to that specific cube with the property.

The giving the cube the property I can do (a la DL007), but the tracking to the certain cube I can’t.

add to the character a boolean property “send” = false.
When the cube receive property send=true.
The character track to the cube only when send = true. This is verified with an expression controller

Okay, but how do I do that? Sorry, my scripting experience is kinda limited…
…Nevermind, just found a thread that answers my question… :cool:

Edit, didnt see the last bit of your last post.

Hmm, after returning to this project, I’ve run into a problem with my “fix”…
The script included in the above mentioned thread is for tracking to the nearest object with a certain property.
I’m wondering how one would edit that script so as to simply track to the object with a certain property…