View Single Post
  #1  
Old 06-06-2001, 09:08 PM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
Simple "Block and Button" puzzle.

For the block,
NPC Code:

if(playerenters){
canbepushed;
}
if(x=buttonx&&y=buttony){
//make sure to replace buttonx/y with the x and y the button is on
set puzzlecomplete;
x = startingx;
y = startingy;
//make sure startingx/y are the co-ordinates that the block
//started on
}



For the door, wall, etc.
NPC Code:

if(playertouchsme&&puzzlecomplete){
hidelocal;
dontblocklocal;
}



A simple block puzzle!