I have a Player Character and Lots of Objects with Logic surrounding the Player (Enemies). Right now, it’s all those Enemies which execute their Scripts/Logic and I would like to see if I could successfully lower the Logic if it was in the Player Script (since the Enemies only behave when the Player is near). However, I don’t use the Near Sensor but make the Logic dependant on the Distance via getDistanceTo() and I would like to stick to that, as it is faster than the Near Sensor.
So, if I use rayCast or a Ray-, Near- or Radar Sensor, I would get the hitObject. My Question is, how can I get and define an Object or a List of Objects within the Player’s Distance that has the Property “x”?
(And don’t tell me I should have put that in CODE Tags! )
I guess or think that this Question has been asked before in either this or a similar Way, but neither the Search Function nor manual Searching helped me.
Right now my Logic is at ~15% with ~125 Enemies in the Level. Test-wisely commenting out the entire Enemy Script lowered the Logic Percentage to ~5% – that’s what I would like to get. :3