Okay…I am working on a little mini game…No weapons…but maybe a pipe.
I made Laser beams blocking off a section of the level…and I have a button in a feced off box so you can just push the button to deactivate the lasers…
I need help with making the laser deactivate when the button get’s pushed…Right now i have it when you hit space the button moves in and the lasers shut off…Is there any other way?? Also How I want to add a lock to the box so you have to hit it a few times and then it breaks and it opens the door so you can push the button to deactivate the lasers.
I am a big noob at GE and Logic bricks and python…
I can post a .blend if someone is willing to help me
Okay. That is do-able. I suspect you dont want to turn the lazers back on after you turn them off so.
what you did was get it so when you pressed a key it moved the button and removed the gates. TO make it so you have to be touching the button AND pressing down a key you would :
give the player a property (the add property button in the logic menu) called player
In the logic menu on the button make 2 sensors a keyboard with the button set to E and a Collision sensor with the “prop:” set to player (the property we set earlier).
connect both of the to the SAME and controller.
So now it senses if we are Touching the the button and pressing down a button. but its not doing anything after so we need to send a message to the lazers to turn off.
make a message actuator on the button change the subject to deactivate that is the message that will be broadcasted to everything.
So now when we are both touching the button and pressing a key it sends the message to deactivate the lazers. But how does the lazer know what to do?
Click on the Lazer and go to Logic Menu
We want to sense when we get the message to deactivate the lazers so.
make a MESSAGE SENSOR on the subject box type in deactivate(the message it tries to find) connect it to an AND actuator then make a EDIT OBJECT ACTUATOR with the dropdown box inside clicked to end object. Connect it to the AND and run the game!