Hello!
How can i put out lantern for some few seconds when i go in a Scriptarea.
Not remove it, just put it of.
I tried this script, but nothing happend.
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1);
}
void Disablelanter(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lantern", false);
}
Ty for your answers in advance!
(01-06-2012, 07:40 PM)idropfatkids Wrote: [ -> ]Hello!
How can i put out lantern for some few seconds when i go in a Scriptarea.
Not remove it, just put it of.
I tried this script, but nothing happend.
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1);
}
void Disablelanter(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lantern", false);
}
Ty for your answers in advance!
change SetEntityActive for
SetLanternDisabled(true);
Just look around in and you'll find some neat stuff
http://wiki.frictionalgames.com/hpl2/amn...ons#player
(01-06-2012, 07:50 PM)SilentStriker Wrote: [ -> ] (01-06-2012, 07:40 PM)idropfatkids Wrote: [ -> ]Hello!
How can i put out lantern for some few seconds when i go in a Scriptarea.
Not remove it, just put it of.
I tried this script, but nothing happend.
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1);
}
void Disablelanter(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lantern", false);
}
Ty for your answers in advance!
change SetEntityActive for
SetLanternDisabled(true);
Just look around in and you'll find some neat stuff http://wiki.frictionalgames.com/hpl2/amn...ons#player
Thanks dude
(01-06-2012, 07:50 PM)SilentStriker Wrote: [ -> ] (01-06-2012, 07:40 PM)idropfatkids Wrote: [ -> ]Hello!
How can i put out lantern for some few seconds when i go in a Scriptarea.
Not remove it, just put it of.
I tried this script, but nothing happend.
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1);
}
void Disablelanter(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lantern", false);
}
Ty for your answers in advance!
change SetEntityActive for
SetLanternDisabled(true);
Just look around in and you'll find some neat stuff http://wiki.frictionalgames.com/hpl2/amn...ons#player
Nothing happend with the lantern it was still "burning" "/ Is it something wrong in the beginning of the script?
Try changing "lantern" into "hand_lantern"
I honestly have no experience with scripting at all, but I noticed this line:
void Disablelanter(string &in asParent, string &in asChild, int alState)
says Disablelanter , shouldn't that be lantern?
Ignore me if 'lanter' is something, though..
EDIT: Yeah, it probably is something since it says the same somewhere else. Nevermind!
(01-07-2012, 03:27 AM)Dewi Wrote: [ -> ]I honestly have no experience with scripting at all, but I noticed this line:
void Disablelanter(string &in asParent, string &in asChild, int alState)
says Disablelanter , shouldn't that be lantern?
Ignore me if 'lanter' is something, though..
EDIT: Yeah, it probably is something since it says the same somewhere else. Nevermind!
If you need some help with anything, check out the
wiki
(01-06-2012, 07:40 PM)idropfatkids Wrote: [ -> ]Hello!
How can i put out lantern for some few seconds when i go in a Scriptarea.
Not remove it, just put it of.
I tried this script, but nothing happend.
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1);
}
void Disablelanter(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lantern", false);
}
Ty for your answers in advance!
Use SetLanternActive(false, true); to turn it off, and SetLanternActive(true, true); to turn it on.