check this blend (2.49b)
http://www.etyekfilm.hu/why_twoball.blend
press space to send a message “now”
the two spawner activates when “now” message coming
but the left makes TWO balls (it uses python script to activate the actuator)
why??
check this blend (2.49b)
http://www.etyekfilm.hu/why_twoball.blend
press space to send a message “now”
the two spawner activates when “now” message coming
but the left makes TWO balls (it uses python script to activate the actuator)
why??
Notice that it adds a ball when you press and release the key, that`s why it adds 2 objects
this one should fix it
rename your message sensor from “sensor1” to “now”
g=GameLogic
c = g.getCurrentController()
now = c.sensors["now"]
if now.positive:
c.activate('act')
print('..............new ball!!!...........')
hm… thank you, interesting… with your code it works correct
but the right does not make two balls, why? it gets same message as the left
i am not really sure, it seems that sensor sends an impulse to python controller whenever sensor value changes.
I can’t download your file from my current location.
I assume you activate the right one with an AND actuator?
In that case keep in mind that the controllers
The Python controllers must explicit perform this behaviour by the script.
Your script was activating the actuators in both cases.
You always have to make a choice out of
I hope it helps