I have applied movement to a cube with apply.movment([0,1,0], True).
How can I stop it if is near a cylinder that is timed to flick from 5 to 5 seconds, and after to continue?
Let's consider the cylinder a barrier.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
Do you mean gameplay stop? If yes make a variable.give it a name like gameplay. now make that variable True to make it boolean
import bge cont = bge.logic.getCurrentController() own = cont.owner w_key = cont.sensors["w_key"] # This is to get the keyboard sensor #The gameplay variable make it playable or not: gameplay = True if gameplay == True and w_key.positive: apply.movment([0,1,0], True) elif gameplay == False and w_key.positive: print("You can't move!")