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
Script Help Why won't this script work?
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Why won't this script work?

There's no point to check for the lever name from the entity variable if the local map variable carries the same name.

PHP Code: (Select All)
void StoreCheckLeverState(string &in entityint state)
{
SetLocalVarInt(entitystate);
CheckLeverStates(); 


(12-17-2011, 05:29 PM)Dobbydoo Wrote: It would be much easier to have only one variable for all levers. Then every time you pull a lever you add one to the variable and when it reaches 6 the puzzle is completed.

That would be error prone. Even if we set a stuck state for each lever when it gets pulled correctly, you'd still be adding 1 for when it gets pulled in the opposite, undesired direction.

Tutorials: From Noob to Pro
(This post was last modified: 12-17-2011, 06:53 PM by Your Computer.)
12-17-2011, 06:16 PM
Website Find


Messages In This Thread
Why won't this script work? - by ferryadams10 - 12-17-2011, 04:29 PM
RE: Why won't this script work? - by palistov - 12-17-2011, 05:18 PM
RE: Why won't this script work? - by Dobbydoo - 12-17-2011, 05:29 PM
RE: Why won't this script work? - by Your Computer - 12-17-2011, 06:16 PM
RE: Why won't this script work? - by Dobbydoo - 12-17-2011, 07:50 PM
RE: Why won't this script work? - by ferryadams10 - 12-17-2011, 06:52 PM
RE: Why won't this script work? - by palistov - 12-17-2011, 07:10 PM
RE: Why won't this script work? - by ferryadams10 - 12-21-2011, 08:29 PM



Users browsing this thread: 3 Guest(s)