Turning physics.movable on and off for door
Krellzar
Member Posts: 5
Hey everybody.
I'm making a door for my topdown rpg styled game. I forgot to turn off movable when I tested it and walked into the door.. It looked so cool when it just smashed out of it's place, so I decided to use that effect when the character opens the door.
I want the character to be collect 5 coins before being able to go through the door. I set up a rule where if 5 coins are collected the physics.movable for the door will be true, otherwise false.
But it doesn't seem to work. It seems it's totally ignoring the rule.. I can set the movable on and off in the door actor and that it reacts to, but that's it. What can I have done wrong? I tried to change the attribute as well, but nothing works.
Can anybody help me?
Comments
Unfortunately you can't switch 'moveable' on and off during runtime.
But there are other ways of doing the same thing, maybe leave 'moveable' on for the door, then place a second (invisible) actor in front of the door, switch 'moveable' off for this actor, and set it to collide with your main actor.
This will stop your main actor from being able to get through the door - place a rule in this blocking actor that says when coins = 5 then destroy this actor.
That is pretty clever! Thanks man
Sounds like a cool game you got going keep us updated.
Darren.
Thanks! I will It's my first Gamesalad game, so I'm just improvising. But so far, it's bringing some pretty funny features into the game
@krellzar here is another way to get a door that blocks the player and can still move to open hopefully it's helpful to you