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?
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#7
RE: Simple shelf puzzle?

I didn't go through all of it or test it, but the problem is probably here

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

    if(GetLocalVarInt("MovableShelf") == 1)
    {
        SetEntityInteractionDisabled("MovableShelf", false);
    }
}

When you touch the shelf for the first time, interaction facilities get disabled, so this function is never called again.

You could either count if all the items are picked off the shelf, and then call SetEntityInteractionDisabled("MovableShelf", false) when the last item is picked, or you could add a script area that encompasses, but is slightly larger than the shelf, and then on collision with it simply check if GetLocalVarInt("MovableShelf") == 1, enabling the interaction if it is.
12-02-2012, 02:00 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: 1 Guest(s)