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
#5
RE: Still one problem to solve

So basically you're trying to place 4 objects on 4 sticky area, but want to make it possible to place them in any order, right?
It probably isn't as complicated as you think it would be.

AttachObject gets called when you place the object on the sticky area, I think you already know how to configure this, if not, ask.
void AttachObject(string &in asArea, string &in asBody, string &in asEntity)
{
SetLocalVarInt(asArea, 1); //For example: Name your areas "sticky_1" "sticky_2" and so on
SetEntityInteractionDisabled(asEntity, true);
}

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");
}
}
}
Note: This will only work if any of the objects can be placed on any sticky area. You have to configure this by yourself if but it seems you've already done that.

[Image: 18694.png]
(This post was last modified: 10-18-2012, 09:09 AM by Ongka.)
10-18-2012, 09:08 AM
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)