1
$\begingroup$

I designed an automated garage door for the BGE that uses rigid body physics and logic bricks to open and close. I made it in one blend file and then added the objects that comprise it to an object group so I could easily append it into other files. However, when I append it and try to run it, the logic no longer has any effect.

Here is the file that I appended it to:

test-door.blend

I have checked the logic bricks and everything else in the file to assure that it's all the same as in the original file, but I can find nothing wrong.

The door is designed to open when a character with the property 'door_key' comes near to an empty placed at the door, and should close again when the character gets near other empties further away on either side of the door. The support bar for the door moves between two other empties that act as targets for the support bar to move towards when opening or closing, The door hangs from the support bar using constraints.

I'm stumped. Can someone please look at this and see if you can find the problem? Thanks in advance.

$\endgroup$
0
+50
$\begingroup$

stackexchange won't let me post more than 2 images so I posted 2 images with everything else on Part 2

I just wanted to apologise that my answer is made up of two images, but stackechange wouldn't let me post more than two images and as you can see I wanted to post five, so as a compromise I instead posted two images of my answer containing the images that I wanted to use.

$\endgroup$
  • $\begingroup$ Your solution to turn on the Actor option works in the test file I uploaded, but not in the file I'm actually trying to implement this in (it's much bigger and I'm not willing to share it). Strange that I didn't see that. I have it turned on already in the big file, so that isn't the problem. The empty nearest the door broadcasts 'door_open', not 'door_close'. You were looking at the wrong empty. They're fairly close together. $\endgroup$ – Anthony Forwood Jul 6 '16 at 20:57
  • $\begingroup$ I leave 'door_key'constantly true because it only needs to be recognized (true or not) by the empties when a car carrying it comes near the door. No other objects will carry the key, so it doesn't really need the excess logic. Is there any situation where this won't work? As it is, I tried your implementation and added the extra logic, but that stopped the door from working again. I'm sorry to say that you didn't earn the bounty. The problem remains. $\endgroup$ – Anthony Forwood Jul 6 '16 at 20:57
  • $\begingroup$ I now see the empty you meant (Sorry that I didn't pay more attention) and I managed to fix it by changing the empty to static and to an actor and also changing the cube to an actor. As far as I know both objects must be actors for the near sensor to work properly. I also appended it to another file and it worked, I hope it works for you. $\endgroup$ – Nicholas M Jul 7 '16 at 0:32
  • $\begingroup$ Funny thing is, I just created a new file and appended the original without changing anything other than to add the cube and ground plane to the group, and it worked, unlike before. But when I append it into my game (the big file I want it in), it now works as well but acts chaotic, as though the physics effects were changed. I'm going to play around with your suggestions. You DID help me solve the problem I posted about, so I'll award you the bounty.Thanks! $\endgroup$ – Anthony Forwood Jul 7 '16 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.