Open and Close a Door?

Hey, im having problems with opening and closing a door in blender…

I have a door, and an open Animation/Action, and a player (First Person)

I’ve been trying to have a near sensor, and a keyboard sensor, connected them to the “And” controller, and then i added the animation.
I’m a beginner, so if this is totally wrong then you know why x]

Anyone knows how to fix?

And also, adding locked doors that requires keys, would be awesome! x3

Thanks in advance! :smiley:

Are both sensors connected to controller and the controller connected to the actuator? :smiley:
Is easier if you put a screenshot of the logic bricks to check everything

Alright, i will, after i eat.


Empty: The character, it has the movement.

Cube.001 = Door.

The door has a property called “door”.

The action/animation name = Dopen (stands for Dooropen x] ).

Any ideas…?

I can

I will send a .blend in a moment

this .blend has no animation keys…

it is a logic based motion :slight_smile:

Attachments

DoorLogic.blend (481 KB)

Ok, thanks, i will try it out…but one thing, i need to add a near sensor, so i have to be close to open it :confused:

open the scene, hit P to play

hit space
yes the object “switch” opens the door using any motion you define,

look at the logic code on switch, right now pressing space will open the door, or colliding with “PlayerGrab”
you can delete the hit space bar part,

create an item on another layer called “PlayerGrab” give this the property “PlayerGrab” as well make it ghost for now(to test it)
and then later make invisible

add a cube about where your players hand is in, set it to ghost and invisible

key (whatever) -----------and-------------Edit item/Add item “PlayerGrab” (time 1 frame)

now your player can line up with the switch, spawn the PlayerGrab and initiate the door :slight_smile:

I did what you wrote, but it didnt work ( im 96% sure i did wrong, im used to 2.49b, not 2.65 :confused: )

I downloaded 2.65 to be able to play the game at all :confused:

Still thank you for your replies :stuck_out_tongue:
door.blend (464 KB)

hrmmm
I don’t understand why… the text box?

can you run 2.65?

re download, don’t mess with anything, open it and hit P, then hit space…

are there errors in the console?

no, no erros, but it worked fine until i added that PlayerGrab and deleted Space leyboard sensor :confused:

Want me to upload the full game?

Here it is:

(the attatchments didn’t work, i got errors when i tried to upload the file O.o, so i used mediafire)

ok so…
if it is to large blenderartists wants an external host…

alright, first thing first, I don’t see any object that has “Keyboard X”--------------and---------Add object “PlayerGrab”

could you name the object “spawn”

that is where your players grab/activare cursor will be?

sorry, i dont understand now, i edited your door example with the playergrab thing, just to see if i can do it, instead of ruining my game :confused:

I think you need to start from scratch, go ahead and get using python and logic down, start with simplicity, and keep adding layers of depth,

build a VERY simple game, then work your way up