Frictional Games Forum (read-only)
Script problem - No matching signatures - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Script problem - No matching signatures (/thread-6490.html)



Script problem - No matching signatures - Evulmeh - 02-06-2011

Hey guys, just started working on some scripting, been trying to get this thing to run for 3 hours now =/

Short backstory: The room has candles (as in a ritual) and need to be lit. Once lit I want the ritual to be completed, and the door to open. So I made a callback script (using just 1 candle for now) stating when the lamp is lit, the door will unlock.

Code:
void OnStart()
{
SetLampLitChangeCallback("candle_floor_1","Lamp_4_lit");
}

void Lamp_4_lit(bool abActive)
{
SetSwingDoorLocked("mansion_1", false, true);
}

Unfortunately when I run the level it comes back with "No matching signatures for SetLampLitChangeCallback"

Did I enter all the parameters correctly? Or did they remove this callback from the game?

Thanks for all that can help! Smile


RE: Script problem - No matching signatures - adamhun - 02-06-2011

there is no such command as SetLampLitChangeCallback


RE: Script problem - No matching signatures - Evulmeh - 02-06-2011

(02-06-2011, 12:14 PM)adamhun Wrote: there is no such command as SetLampLitChangeCallback

Strange, it seems to be in the script reference document found here

But if this code is perhaps removed, is there another way to trigger a door unlock at a lamp lit?


RE: Script problem - No matching signatures - adamhun - 02-06-2011

"Almost all scripts are used in Penumbra/Penumbra: Overture" so yeah, Frictional removed it.
As for the other way, you could try to make a callback func on the lamp, and maybe use OnIgnite ... but I'm not sure on this one


RE: Script problem - No matching signatures [Solved] - Evulmeh - 02-06-2011

(02-06-2011, 12:35 PM)adamhun Wrote: "Almost all scripts are used in Penumbra/Penumbra: Overture" so yeah, Frictional removed it.
As for the other way, you could try to make a callback func on the lamp, and maybe use OnIgnite ... but I'm not sure on this one

Cheers, I solved it so for those of you who searched this here's what I did:

I made a Callbackfunction in the level editor on the candle I wanted.
Then, in my script I simply made a callback to the input I gave in the editor and left the type blank so the script would fill this in itself.

Then I said that if the type equals OnIgnite, it would execute a script unlocking the door.

Heres the code:
Code:
void candleignite(string &in EntityName, string &in Type)
{
    if(Type == "OnIgnite")
    {
       [Enter the things you want done here]
     }
}