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
Doubt about a puzzle idea (script)
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#8
RE: Doubt about a puzzle idea (script)

Well, I agree with Spelos,
but let's be cute & SMART with our code.

Instead of grabbing the number and converting it to Int.
Let's have "vase_" and combine it with the number we have.

PHP Code: (Select All)
int vasesBroken 1;

void BreakVase(string &in asEntitystring &in type)
{
    if(
type != "OnBreak") return;

    if(
asEntity == "vase_" vasesBroken)
    {
        if(
vasesBroken == 4)
        {
            
//The Player got it right!
            
return;
        }
        
vasesBroken++;
        return;
    }

    
vasesBroken 1;
    
ResetProp("vase_*");

03-08-2016, 12:16 PM
Find


Messages In This Thread
RE: Doubt about a puzzle idea (script) - by Spelos - 03-08-2016, 12:16 PM



Users browsing this thread: 1 Guest(s)