Okay so I have been busy with this script for a time now and I still can't seem to solve it I have this script the thing it should do is that when object_1-4 touches stickyArea_1-4 the puzzle should be completed. But now it doesn't really do anything.
this is the script:
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);
}
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.
(This post was last modified: 10-18-2012, 09:09 AM by Ongka.)
(10-18-2012, 09:08 AM)Ongka Wrote: 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);
}
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.
well no it's only supposed to work if the correct objects are in the correct sticky area's so 1 for 1 an d 2 for 2 ect.
CURRENTLY WORKING ON: Final Light = 40%
Need of voice actors.
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);
}
}