Some More Help

Ok, first I would like to thank the guy in my other thread. My bar now works.

So now I have something a bit harder for you guys. I have flippers with Keyboard for the sensor, AND for the controller and Motion for the Actuator. You press left to make the flipper rotate left and right for it to rotate right. This is alright but I have more than one of these flippers, in fact soon in one level they will be more than one hundred.

So when I press the left arrow key they all move left, this is a problem. I only want the flipper nearest to the ball to move left. And when it is hit upwards to another flipper the old then becomes ‘unative’ so you are not able to rotate it, and then for the next nearest flipper to become active.


Thanks in advance.

Simple answer is to use near sensor. Add this sensor to flipper to check, if ball is close enough. But it depends on how flippers are placed in scene - if they are close to each other, there is a chance that more than one flipper will rotate.
If you want to rotate exactly one flipper, check in Python script distance of ball from flippers with active near sensor and rotate only the nearest one.

ignoring the grammer problems:

that will really slow things down a lot, you may want to consider fewer, much fewer, perhaps no more than 20. Blender’s game engine doesn’t do large numbers of objects well, it becomes very slow.

(I am curious about what you will be doing with so many “flippers”…)

Note: Sorry for the spelling mistakes in advance.

Ok, so I put a Near sensor… which I kinds already figured. What now, what do I use for the aculator? Do I just need some true or faulse propertie and then like, code it or something?

no, not at all

your near sensor: set the property to be a property the ball has
set the Dist and Reset values approaitely (how close to turn on, how close to turn off)
press the true pulse button for your near sensor

for your keyboard sensor press the true and false pulse buttons

connect both to a and controller

and that to an ipo controller, flipper mode if you want it to reset when the ball leaves or the key is let go

I haven’t tested exactly the setup I proposed above, but it should work

some almost relavant example file: (with way to many objects, 268 kilobytes)

Hey, thanks. That works great!