Frictional Games Forum (read-only)
[SCRIPT] Script for 3 rods - Printable Version

+- 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: [SCRIPT] Script for 3 rods (/thread-24192.html)



Script for 3 rods - DethTrap - 12-23-2013

Any help about the scripting for 3 rods? I have nothing to see from other video about this tutorial. Sad


RE: Script for 3 rods - PutraenusAlivius - 12-23-2013

I don't understand? Can you kinda give me some insight on this? I certainly can't make a script with just "3 rods".


RE: Script for 3 rods - DethTrap - 12-23-2013

I mean the rod puzzle. The 3 rods must be put in a hole just like from machine room in ATDD.
I need to know this kind of script.


RE: Script for 3 rods - PutraenusAlivius - 12-23-2013

Oh. So if the three rods is inserted something happens? I assume that's the case.
Spoiler below!

//Rods_* are the rods
//TouchArea_* are the script areas. They must be put where the holes are.
void OnStart()
{
for(int = b; b == 3; b++) AddEntityCollideCallback("Rods_*", "TouchArea_*", "RodsInsert", true, 1);
SetLocalVarInt("Rods", 0);
}

void RodsInsert(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Rods", 1);
RodsCheck();
}

void RodsCheck()
{
if(GetLocalVarInt("Rods") == 3)
{
//...Do something...//
}

else if(GetLocalVarInt("Rods") < 3)
{
}
}




RE: Script for 3 rods - DethTrap - 12-23-2013

You right. 3 rods must be put in the case.

My question is did you know how to script on it?


RE: Script for 3 rods - Romulator - 12-23-2013

What JustAnotherPlayer put in the Spoiler is the appropriate script for it. However in the part where it says //...Do something...//, you code what you want to happen, like, a door somewhere else opens, or something turns on, etc.


RE: Script for 3 rods - DethTrap - 12-23-2013

ok i got your point. So i will try it.