+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SOLVED] Still one problem to solve (/thread-18778.html)
[SOLVED] Still one problem to solve - Steve - 10-14-2012
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:
RE: Still one problem to solve - Steve - 10-17-2012
nobody? If nobody know what wrong then I'm gonna try a making a new script...
RE: Still one problem to solve - Akos115 - 10-17-2012
Try SetMultiSliderCallback instead of SetEntityConnectionStateChangeCallback.
I think it should work then.
RE: Still one problem to solve - The chaser - 10-18-2012
It's a complicated script. I don't really know what to do, because I know a little about sticky areas. I hate the inability to help people
RE: Still one problem to solve - Ongka - 10-18-2012
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.
Code:
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.
RE: Still one problem to solve - Steve - 10-18-2012
(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.
Code:
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.
RE: Still one problem to solve - Ongka - 10-18-2012
The areas are called sticky_1 - 4 and the entites which are placed on the areas are called _body_1 - 4
Code:
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);
}
}