i need to choose from several objects in the scene and get one of them active.
wondering how to do it. in logic bricks connection for a particular object is done. if i start with a default object how do i pass control to other objects in the scene.
all i know id bge.logic allows me to get the list of objects in the scene.
What do you mean with active?
What do you mean with default object?
All objects are active regarding logic.
you mean to get the name of objects in the current scene and to do something with it.
like monster said all objects in the scene are active. but if u need to control of the individual objects, u better learn the 2,5x python api
your nickname… hmmn…
Ok I’ll explain in detail…
say i have 3 objects:Cube, Plane, Torus
i m using a accelerometer(sensor) to rotate a object.
thus an ‘Always’ sensor in logic bricks for all the objects… at one time only one object moves say a ‘Cube’.
But i want an option to change the control to another object, by some external hardware…so that only that object moves.
You should use Python for this (just because it’s easier). If you want to do it in logic bricks, it would consist of each object having a property that indicates which object should be rotating. If property = 0, the cube rotates. 1 = plane rotating, 2 = torus rotating. If the property doesn’t make an object rotate, it should stop (the Property sensor may send out a negative pulse, which should make the motion actuator deactivate). Once the property exceeds 2, loop it back to 0 (and vice versa).
thank you. i thought of the same… wanted to know if any other way to deal with same.
because in this case all the objetcs’ logic brick would be getting processed… thus unnecessary processing…