Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple shelf puzzle?
Potato Offline
Senior Member

Posts: 678
Threads: 10
Joined: Jun 2012
Reputation: 37
#5
RE: Simple shelf puzzle?

Alright, well, it didn't go exactly as planned. The shelf itself can be moved before any items are removed from it, and the once you let go of it, you're unable to interact with it further. Removing the items don't exactly help.

If you could, could you possibly take a look at this script and see if there's any damning factors here.

void TouchShelf(string &in asEntity)
{
if(GetLocalVarInt("MovableShelf") == 0)
{
SetMessage("Messages", "YourMessage", 0);
SetEntityInteractionDisabled("MovableShelf", true);
}



if(GetLocalVarInt("MovableShelf") == 1)
{
SetEntityInteractionDisabled("MovableShelf", false);
}
}void EnableMove(string &in asParent, string &in asChild, int alState)
{
if(asChild == "Stuff_1")
{
if(alState == 1)
{
AddLocalVarInt("StuffVar", -1);
}
if(alState == -1)
{
AddLocalVarInt("StuffVar", 1);
}
}
if(asChild == "Stuff_2")
{
if(alState == 1)
{
AddLocalVarInt("StuffVar", -1);
}



if(alState == -1)
{
AddLocalVarInt("StuffVar", 1);
}if(GetLocalVarInt("StuffVar") == 0) //Desired number. This defines how many boxed there were taken off the shelf. If 0, then all boxes are off. If less than 0 (-1, -2, -3) Some boxes can remain.
{
SetLocalVarInt("MovableShelf", 1);
}
if(GetLocalVarInt("StuffVar") == -2) //Desired number of boxes on the shelf.
{SetLocalVarInt("MovableShelf", 0);}}}

[Image: o8JPTkt.jpg]
upsilon floorbot is a qt pa2t
12-02-2012, 01:34 AM
Find


Messages In This Thread
Simple shelf puzzle? - by Potato - 11-29-2012, 07:13 AM
RE: Simple shelf puzzle? - by FlawlessHappiness - 11-29-2012, 07:51 AM
RE: Simple shelf puzzle? - by Potato - 11-29-2012, 08:16 AM
RE: Simple shelf puzzle? - by Damascus - 11-29-2012, 08:34 AM
RE: Simple shelf puzzle? - by Potato - 12-02-2012, 01:34 AM
RE: Simple shelf puzzle? - by The chaser - 12-02-2012, 01:56 AM
RE: Simple shelf puzzle? - by TheGreatCthulhu - 12-02-2012, 02:00 AM
RE: Simple shelf puzzle? - by Damascus - 12-02-2012, 03:27 AM
RE: Simple shelf puzzle? - by The chaser - 12-02-2012, 11:24 AM



Users browsing this thread: 2 Guest(s)