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
Variable
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Variable

Yes it would, but your code has some errors.
Firstly, you missed a pair of quotation marks. Secondly your function would loop endlessly; What you are currently doing:
void Wake(string &in asTimer)
{
    if(GetLocalVarInt("Breath")==3)
     {
       //Something
      }
    else
       {
          PlayGuiSound("react_breath_slow.snt", 1);
        }
        AddLocalVarInt("Breath", 1);
        AddTimer("return", 2.45, "Wake");
}
What you want (i assume):
void Wake(string &in asTimer)
{
  if(GetLocalVarInt("Breath")==3)
   {
     //Something
    }
   else
     {
       PlayGuiSound("react_breath_slow.snt", 1);
       AddLocalVarInt("Breath", 1);
       AddTimer("return", 2.45, "Wake");
     }
}
Hope that helps Wink
(This post was last modified: 08-03-2011, 12:42 AM by Apjjm.)
08-03-2011, 12:40 AM
Find


Messages In This Thread
Variable - by X4anco - 08-03-2011, 12:36 AM
RE: Variable - by Apjjm - 08-03-2011, 12:40 AM
RE: Variable - by X4anco - 08-03-2011, 12:47 AM



Users browsing this thread: 1 Guest(s)