Some questions...

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

How do you get a mouse into the GE…

to show a mouse in game.

import Rasterizer

then have an always sensor attached to a python controller with the name of your script in the box.

Thank you…Is that all i have to do for it to show a mouse?

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!

I will upload an Example blend in a minute.

Here is the example file. Just press P to play look at the Logic buttons on the player (The property on the left hand side)

arrow keys to move, run into the big pink button and press E;11662645;/fileinfo.html

Thank you…But i dont have a player…And i SUCK ASS at making a FPS template…

When i get a template ill give more info…

DUH!! I could Use SOCIALS!

your welcome, and yes that’s all you have to do.

Ok…Well it didnt work then…I pasted it in to the text editor and nothing…

Im gunna take a break for a few hours…maybe a day or two…

It works for me, heres a .blend


show mouse.blend (124 KB)

To make a lock break after some impulses try this:

Damage: 0

Swing baton_____AND_____Damage: +1
Damage: 5_____AND_____Break

Thanks Killer and MCG…I forgot that you need SOME logic with python…
And killer ill try that script out ASAP

That’s not a script… that’s my version of text logic bricks =P just use the bricks I said.

and turn off pulse mode, otherwise the script is run all the time, eating processing power.

the show mouse script might not work cuz there’s a bug in some blender versions making TRUE not work, instead, replace TRUE with 1

No there’s not. It’s not TRUE it’s True

True TRUE true wutever, if ur using 2.46 then there certainly is a bug

Lipsonfire is correct. There is a bug in 2.46 that causes python script "True"s to give an error. Same with “False”, you have to use 1 or 0.

I’m using 2.46… no problems.