Making rooms inaccessible

Lady_Jane
05 Apr 2008, 20:24
Sorry, if this has already been answered.

I know that you can make objects initially inaccessible, and have a script run to make them accessible, but can the same be done for rooms? I want the player to have to cut away a barrier using an object before they can get into the next room, is this possible?
Thanks. I'm using QDK Lite.

METALGod32
05 Apr 2008, 20:30
Well one way to do this is once the barrier is broken then create an exit.

another way is to make an if statement in the next room that checks to see if the barrier is broke, if not then send player back to the other
room with a msg saying that the barrier needs to broke first.

Lady_Jane
05 Apr 2008, 22:15
METALGod32 wrote:Well one way to do this is once the barrier is broken then create an exit.


How would you do this?

METALGod32
06 Apr 2008, 00:21
You would make a variable called whatever you like, make it a numeric one.
Set it to value: 0
Have the var load at start up of the game this way
your game knows that the var is there and ready to use.

once the player moves to the blocked room without cutting away the
barrier, then the IF statement in the blocked room will check to see if
your var is equal to 1, if It's still equal to 0 it'll send the player quickly
back to the other room, because the if statement will say what room to
send player to if your var is 0.

But now in your barrier code, once the barrier is completely destroyed
then set your var to 1, use another if statement if you have to.

once the barrier is destroyed the player can then move to the other room
because your var is now equal to 1.

I Know it seems a bit confusing, first time I've tried to explain exactly
what to do from simple text.

Sorry, but if you need anything else I'll try to answer, Goodluck :)

Lady_Jane
07 Apr 2008, 00:53
Thank- You for your help