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
[SOLVED] Still one problem to solve
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#7
RE: Still one problem to solve

The areas are called sticky_1 - 4 and the entites which are placed on the areas are called _body_1 - 4
void AttachObject(string &in asArea, string &in asBody, string &in asEntity)
{
    if(asArea + asEntity == "sticky_1_body_1")
    {
    SetLocalVarInt(asArea, 1); //In this case the Var is called sticky_1
    SetEntityInteractionDisabled(asEntity, true);
    }
    else if(asArea + asEntity == "sticky_2_body_2")
    {
    SetLocalVarInt(asArea, 1); //In this case the Var is called sticky_2
    SetEntityInteractionDisabled(asEntity, true);
    }
    else if(asArea + asEntity == "sticky_3_body_3")
    {
    SetLocalVarInt(asArea, 1); //In this case the Var is called sticky_3
    SetEntityInteractionDisabled(asEntity, true);
    }
    else if(asArea + asEntity == "sticky_4_body_4")
    SetEntityInteractionDisabled(asEntity, true);
    {
    SetLocalVarInt(asArea, 1); //In this case the Var is called sticky_4
    SetEntityInteractionDisabled(asEntity, true);
    }
    else
    {
    AddDebugMessage(asEntity + " doesn't fit on " + asArea, false);
    }    
}

void CheckIngredients(string &in asEntity, int alState)
{
if(alState == 1)
{
if (GetLocalVarInt("sticky_1") == 1
&& GetLocalVarInt("sticky_2") == 1
&& GetLocalVarInt("sticky_3") == 1
&& GetLocalVarInt("sticky_4") == 1)
{
AddDebugMessage("OvenPuzzle: Correct!", false);
AddTimer("CompleteOvenPuzzle", 1, "CompleteOvenPuzzle");
}
}
}
Try it out, may or may not work.

[Image: 18694.png]
10-18-2012, 04:40 PM
Find


Messages In This Thread
[SOLVED] Still one problem to solve - by Steve - 10-14-2012, 08:42 PM
RE: Still one problem to solve - by Steve - 10-17-2012, 04:37 PM
RE: Still one problem to solve - by Akos115 - 10-17-2012, 10:01 PM
RE: Still one problem to solve - by The chaser - 10-18-2012, 06:41 AM
RE: Still one problem to solve - by Ongka - 10-18-2012, 09:08 AM
RE: Still one problem to solve - by Steve - 10-18-2012, 01:55 PM
RE: Still one problem to solve - by Ongka - 10-18-2012, 04:40 PM
RE: Still one problem to solve - by Akos115 - 10-18-2012, 04:48 PM
RE: Still one problem to solve - by Ongka - 10-18-2012, 04:53 PM
RE: Still one problem to solve - by Steve - 10-24-2012, 09:23 PM



Users browsing this thread: 1 Guest(s)