Frictional Games Forum (read-only)

Full Version: Script didn't work...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hy i am new in this forum and in Scripting too.

I Have a problem with my scripts, i want a lamp to turn on when collide with a area called lampson.

I think the script is right.

Code:
void Lamps(string &in asItem, string &in asEntity)
{
     SetLampLit("chandelier_nice_1", false, false);
}

////////////////////////////
// Run On Enter
void OnEnter()
{
AddEntityCollideCallback("Player", "lampson", "Lamps", false, 1);
}

Where is the problem?Huh
It is best to have everything in the void OnStart() that you did not include...

Try this:

Code:
void OnStart()
{
     AddEntityCollideCallback("Player", "lampson", "Lamps", false, 1);
}
void Lamps(string &in asParent, string &in asChild, int alState)
{
     SetLampLit("chandelier_nice_1", false, false);
}

By the way, welcome to the forums!
Yeah.Kyles script is right Wink Welcome to the forums!
Thanks it works.Big Grin