Thanks.
I had just kept using "add" instead of "set", but I've corrected it now. Impulse script on a door now is frustrating me though!
In the void Onstart() section I have these callback functions listed:
AddEntityCollideCallback("Player", "ScriptArea_3", "Candlelight1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Candlelight2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Candlelight3", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "Candlelight4", true, 1);
Then further down in my script I have:
void Candlelight1(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle_floor_1", true, true);
SetLampLit("candle_floor_2", true, true);
AddPropImpulse("prison_section_1", 0.0f, 0.0f, 0.2f, false);
}
void Candlelight2(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle_floor_3", true, true);
SetLampLit("candle_floor_4", true, true);
AddPropImpulse("prison_section_1", 0.0f, 0.0f, 0.2f, false);
}
void Candlelight3(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle_floor_5", true, true);
SetLampLit("candle_floor_6", true, true);
AddPropImpulse("prison_section_1", 0.0f, 0.0f, 0.25f, false);
}
void Candlelight4(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle_floor_7", true, true);
SetLampLit("candle_floor_8", true, true);
AddPropImpulse("prison_section_1", 0.0f, 0.0f, 0.3f, false);
}
The effect is to light candles on either side of you as you walk down a corridor and slowly push a door ("prison_section_1") open in front of you. My AddPropImpulse section keeps returning non-matching signatures.