The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Need help with a script (again)
Akasu Offline
Member

Posts: 62
Threads: 6
Joined: Aug 2010
Reputation: 2
#1
Need help with a script (again)

I've been trying to get this script to work for 2 hours now with no luck.
It should make a light visible when a box is in the right place and make it invisible when it's not in place.

void OnStart ()
{
AddEntityCollideCallback("box1","area_red","BOX1RED", false, 1);
}

// Is this right? : "box1" is the object that should collide with the "area_red", "BOX1RED" is the script it runs when collided, "false" makes the script re-runnable, and "1" means that the "BOX1RED" runs on collide (-1 runs when they're not colliding)


void BOX1RED(string &in asParent, string &in asChild, int alState)
{if(asChild == "area_red") {
SetLightVisible("redy", true);
// "redy" is a pointlight
}
else SetLightVisible("redy", false);
}

I copied it from one of the main maps' scripts but it won't work. It simply does nothing (doesn't crash though)
09-22-2010, 08:03 PM
Find


Messages In This Thread
Need help with a script (again) - by Akasu - 09-22-2010, 08:03 PM
RE: Need help with a script (again) - by gosseyn - 09-22-2010, 08:11 PM
RE: Need help with a script (again) - by Akasu - 09-22-2010, 08:17 PM
RE: Need help with a script (again) - by gosseyn - 09-22-2010, 08:23 PM
RE: Need help with a script (again) - by Akasu - 09-22-2010, 08:32 PM
RE: Need help with a script (again) - by gosseyn - 09-22-2010, 08:35 PM
RE: Need help with a script (again) - by Akasu - 09-22-2010, 08:38 PM
RE: Need help with a script (again) - by gosseyn - 09-22-2010, 08:47 PM
RE: Need help with a script (again) - by Akasu - 09-22-2010, 09:05 PM
RE: Need help with a script (again) - by Akasu - 09-22-2010, 09:25 PM
RE: Need help with a script (again) - by jens - 09-23-2010, 06:34 AM
RE: Need help with a script (again) - by Akasu - 09-23-2010, 10:44 AM



Users browsing this thread: 1 Guest(s)