Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reversing collide callback
Author Message
Damascus Offline
Senior Member

Posts: 634
Joined: Mar 2012
Reputation: 27
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)