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
LocalVar
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#3
RE: LocalVar

*edit*
NINJA'D >.<

I think that this line:

SetEntityPlayerInteractCallback("Flask_"+i+"", "AddLocalNumber", false);

should be this instead:

SetEntityPlayerInteractCallback("Flask_"+i, "AddLocalNumber", false);
And I would put your if statements into the "All_Active" function.
Spoiler below!

void OnStart()
{
    SetLocalVarInt("InsaneImages", 0);
    AddEntityCollideCallback("Player", "AreaActivateInteract", "ActivateInsaneImages", true, 1);
}

void ActivateInsaneImages(string &in asParent, string &in asChild, int alState)
{
    for(int i=1;i<=3;i++) {
    SetEntityPlayerInteractCallback("Flask_"+i+"", "AddLocalNumber", false);
    }
}

void AddLocalNumber(string &in asEntity)
{
        AddLocalVarInt("InsaneImages", 1);
        All_Active();
}

void All_Active()
{

if(GetLocalVarInt("InsaneImages") == 1)
    {
        SetEntityActive("armour_nice_complete_1", true);
        SetEntityActive("", true);
    }
    
if(GetLocalVarInt("InsaneImages") == 2)
        {
            SetEntityActive("armour_nice_complete_2", true);
            SetEntityActive("", true);
        }
if(GetLocalVarInt("InsaneImages") == 3)
{
SetEntityActive("armour_nice_complete_3", true);
SetEntityActive("", true);
}
}



Try that and see if it fixes it.

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
(This post was last modified: 09-11-2012, 11:18 PM by Tomato Cat.)
09-11-2012, 11:16 PM
Find


Messages In This Thread
LocalVar - by i3670 - 09-11-2012, 10:43 PM
RE: LocalVar - by Adny - 09-11-2012, 11:16 PM
RE: LocalVar - by Tomato Cat - 09-11-2012, 11:16 PM
RE: LocalVar - by FlawlessHappiness - 09-12-2012, 07:01 AM



Users browsing this thread: 1 Guest(s)