Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Enabling Point Light when enter script area
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#1
Enabling Point Light when enter script area

I created a script where in a dark room when u enter the script area a firewood entity lights and a body appears on top of it. the script itself works but the fire doesn't give off much light. i put a point light above it, set it to inactive, and put in
SetLightVisible(string& asLightName, bool abVisible);
into the script but when i go there the light is still visible even before i enter the script area.Huh

{
AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1);
}

void scare_fire(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("firescare", true);
SetEntityActive("firebody", true);
SetLightVisible("firescarelight, 1);
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, false);
}
any idea on how to fix this?
i tryed to attach prop to fire but the light is still there the same as before and doesn't change when i enter the area.
Thank YouShy

This Darn House! , Four Doors, Youtube
02-02-2012, 11:25 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#2
RE: Enabling Point Light when enter script area

{
SetLightVisible("firescarelight, false);
AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1);
}

void scare_fire(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("firescare", true);
SetEntityActive("firebody", true);
SetLightVisible("firescarelight, true);
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, false);
}




Its a bool, bool is true/false
If that doesn't work then i dunno, im having a rest after finishing outskirts
oh, also
void OnStart
{
SetLightVisible("firescarelight", false);
AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1);
}

void scare_fire(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("firescare", true);
SetEntityActive("firebody", true);
SetLightVisible("firescarelight", true);
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, false);
}



need these "

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 02-02-2012, 11:36 AM by Tripication.)
02-02-2012, 11:27 AM
Find
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#3
RE: Enabling Point Light when enter script area

(02-02-2012, 11:27 AM)Tripication Wrote: {
SetLightVisible("firescarelight, false);
AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1);
}

void scare_fire(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("firescare", true);
SetEntityActive("firebody", true);
SetLightVisible("firescarelight, true);
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, false);
}




Its a bool, bool is true/false
If that doesn't work then i dunno, im having a rest after finishing outskirts
oh, also
void OnStart
{
SetLightVisible("firescarelight", false);
AddEntityCollideCallback("Player", "fireplacescare", "scare_fire", true, 1);
}

void scare_fire(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("firescare", true);
SetEntityActive("firebody", true);
SetLightVisible("firescarelight", true);
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, false);
}



need these "
Thanks And I'm Downloading Your Custom Story Now It Looks GoodBig Grin


This Darn House! , Four Doors, Youtube
02-02-2012, 11:38 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#4
RE: Enabling Point Light when enter script area

lol, dont be dissapointed when its not. and no probs

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
02-02-2012, 11:41 AM
Find




Users browsing this thread: 1 Guest(s)