09-20-2010, 05:22 PM
Code:
SetLampLit("Candle01", [], []);
SetLampLit("Candle01", [], []);
(09-20-2010, 05:24 PM)Pandemoneus Wrote: [ -> ]SetLampLit(string& asName, bool abLit, bool abEffects);
SetLampLit("Candle01", false, true);
But you should probably post your script, I don't think the problem lies within that line.
void OnStart()
{
//Smthing... Not affecting this one
SetEntityPlayerInteractCallback("CookKey", "CookKeyTaken", true);
//Then I think it is the line above
}
void CookKeyTaken(string &in asEntity)
{
SetLampLit("Candle01", false, true);
SetLampLit("Candle02", false, true);
SetLampLit("Candle03", false, true);
}
void OnStart()
{
AddUseItemCallback("useexit1", "CookKey", "CookDoor", "UseKey1",true);
SetEntityPlayerInteractCallback("CookKey", "CookKeyTaken", true);
}
void UseKey1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
}
void CookKeyTaken(string &in asEntity, string &in asType)
{
SetLampLit("Candle_1", false, true);
SetLampLit("Candle_2", false, true);
SetLampLit("Candle_3", false, true);
}
(09-20-2010, 08:04 PM)jens Wrote: [ -> ]You should not use SetEntityPlayerInteractCallback for this. Instead use the level editor and enter a callback in the first input field for an entity. If you look at the tool tip you can see it can be used for things like OnPickup, which is what you do in this case.
And when you do this the correct is CookKeyTaken(string &in asEntity, string &in asType)