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
Reversing collide callback
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Reversing collide callback

I'm trying to create an EntityCollideback that triggers when something enters OR leaves a script area. I'm trying to test it by having a light turn on or off depending on whether the object is placed there or not.

AddEntityCollideCallback("EarthRock", "EarthArea", "PlaceEarth", false, 1);

void PlaceEarth(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
FadeLightTo("PointLight_9", 0.0f, 0.7f, 0.0f, 1.0f, -1, 1);
}
else
{
FadeLightTo("PointLight_9", 0.0f, 0.0f, 0.0f, 1.0f, -1, 1);
}
}

For the life of me i can't figure out what's wrong, but the light isn't turning off when I remove the object. I copied the syntax exactly from an area that damaged your sanity if you were standing inside it, which worked perfectly.

Never mind, I naturally solved it myself moments after posting the thread.

(This post was last modified: 03-29-2012, 08:32 PM by Damascus.)
03-29-2012, 08:30 PM
Find




Users browsing this thread: 1 Guest(s)