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
Is there anyway to trigger a billboard that is connected to a light?
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#1
Is there anyway to trigger a billboard that is connected to a light?

Is there anyway to trigger a billboard that is connected to a light?
I am using a billboard for a bloom effect, and I do see that you can connect these to lights. But whenever I do connect them to a point
light or spot light, the billboard does not do its command.

This is what im trying to do.

1. The billboard would be triggering off the from the start.
2. When you enter an area trigger, the billboard fades in.
3. When you get out of the trigger, the billboard fades out. (fading to turn off)

So this is my script so far, it should work but refuses too.

void OnStart()
{
SetEntityActive("HDR1A_L", false);
SetEntityActive("HDR1B_L", false);
AddEntityCollideCallback("Player", "HDR1", "HDR1Active", false, 1);
AddEntityCollideCallback("Player", "HDR1", "HDR1NonActive", false, -1);
}
void HDR1Active(string &in asParent, string &in asChild, int alState)
{
FadeLightTo("HDR1A_L", 1, 0.862, 0.655, 1, 1, 10);
}
void HDR1NonActive(string &in asParent, string &in asChild, int alState)
{
FadeLightTo("HDR1B_L", 0, 0, 0, 0, 0, 10);
}

Demonstration (Script is not in the video)

http://www.youtube.com/watch?v=QNsZXdE1E_I

So can anyone help please? Smile
(This post was last modified: 09-04-2013, 12:27 AM by jssjr90.)
09-03-2013, 09:33 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: Is there anyway to trigger a billboard that is connected to a light?

I don't think you need to set the billboards inactive, just turn off the lights connected to them.
SetLightVisible lightname, false


And the callbacks are not working, i guess?
i don't think you can set two callbacks for the same parent+child.
So put them together and try again.

PHP Code: (Select All)
OnStart{
AddEntityCollideCallback("Player""HDR1""HDR1Switch"false0); } 


PHP Code: (Select All)
void HDR1Switch(string &in asParentstring &in asChildint alState)
{     
          if ( 
alState == -) { FadeLightTo("HDR1A_L"10.8620.6551110); }    
          if ( 
alState == ) { FadeLightTo("HDR1B_L"0000010); }


(This post was last modified: 09-03-2013, 11:06 PM by Daemian.)
09-03-2013, 11:03 PM
Find
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#3
RE: Is there anyway to trigger a billboard that is connected to a light?

Solved it. Tongue

void OnStart()
{
FadeLightTo("HDR1A_L", 0, 0, 0, 0, -1, 0);
FadeLightTo("HDR1B_L", 0, 0, 0, 0, -1, 0);
AddEntityCollideCallback("Player", "HDR1_Area", "HDR1Switch", false, 0);

}
void HDR1Switch(string &in asParent, string &in asChild, int alState)
{
if ( alState == 1 ) { FadeLightTo("HDR1A_L", 1, 0.862, 0.655, 1, -1, 10); }
if ( alState == 1 ) { FadeLightTo("HDR1B_L", 1, 0.862, 0.655, 1, -1, 10); }

if ( alState == -1 ) { FadeLightTo("HDR1A_L", 0, 0, 0, 0, -1, 10); }
if ( alState == -1 ) { FadeLightTo("HDR1B_L", 0, 0, 0, 0, -1, 10); }
}
(This post was last modified: 09-04-2013, 12:26 AM by jssjr90.)
09-03-2013, 11:59 PM
Find




Users browsing this thread: 2 Guest(s)