Ok, so i know the title makes me sound like a complete noob, and maybe i am, but first read this to confirm. So i am making a fps(shocker) and i started to learn python because i realized i was very limited with only logic bricks. With python i made a working script to randomize how the bullets shoot from the gun, simulating spread. So thats about as good as I am right now. (by the way if you are new and want that script just post a reply saying so and ill post it here)
anyway my problem is that i dont really understand the 2.5 api. for example
class bge.types.SCA_PropertySensor(SCA_ISensor).
That is obviously a property sensors, but how do i find out what the actual code i need to type into my script is if i want to use a property sensor?
would i just do something like.
import bge
cont = bge.logic.getCurrentController()
propsensor = cont.sensors[“SensorNameHere”]
and then to use propName would i do?
propsensor.propName = ?
or
propsensor(‘propnamehere’, ‘valuehere’)
Im really confused could someone explain how i would use the property sensor because i think thats a good example plus i need to know it.
and also please dont tell me to learn regular python first because i have done that for about the last week and a half when i havent been in school/schoolwork or at sports.