Sensor option skip python bug

Hi all, I’m still learn the API of BGE and I notice that the Frequency option change to Skip, but if I use the API function sens.tick_skip doesn’t work, it give me an attribute error, is it a bug or I do something wrong ?

Here the link of the API
https://www.blender.org/api/blender_python_api_2_77_release/bpy.types.Sensor.html#bpy.types.Sensor.tick_skip

Thanks in advance :slight_smile:

You’re looking at the bpy module, for use inside blender only. The game engine has its own API.
You can find this API reference also in the Blender docs (bge/bge.types/SCA_…), but also using the ​dirfunction which shows the attributes of the object. In your case, the error AttributeError means that no attribute with the name you provided exists.

Ah ok, but I search in the BGE API and I find just this https://www.blender.org/api/blender_python_api_current/bge.types.SCA_AlwaysSensor.html
well I’m not looking for always sensor option, but for generale option of logic bricks…I continue to search.

Thanks

Oh well, I find it :smiley: thanks to your suggest to watch the dir function, now is call skippedTicks and it’s works :smiley: thanks a lot Agoose

The Always sensor is a special type of sensor. To find attributes and methods common to all sensors, you must look at its base class:
https://www.blender.org/api/blender_python_api_current/bge.types.SCA_ISensor.html#bge.types.SCA_ISensor

Have a quick look at this topic. It’s about how to use the blender/BGE API.
In specific, the section on subclassing. All sensors inherit from SCA_ISensor which contains skippedTicks