Hatchet 0 Posted May 14, 2002 I'm creating a middle eastern town, I want the streets to be lit by fires from wrecked vehicles and things like that instead of the street lights. But, I don't know how to turn off or delete the street lights so that they do not turn on. Someone help me please. Share this post Link to post Share on other sites
SCLZ 0 Posted May 14, 2002 First you have to figure out where the street lights are in the town your using, then place an object next to them like a barrel or chair. In the init field of the placed object put this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">nearestObject [this, "StreetLamp"] switchLight "OFF"<span id='postcolor'> You may have to give the object a name for it to work but I don't think so. It can take a few seconds for it to kick in too. Share this post Link to post Share on other sites
Hatchet 0 Posted May 14, 2002 just tried it, says unknown operator switch Share this post Link to post Share on other sites
SCLZ 0 Posted May 14, 2002 Hmm...just copied and pasted my code sample into a test mission and it worked fine. Did you copy it right? We are talking about the built-in street lights found in some towns? I can't get it to give that error message you said so I'm kinda in the dark (no pun intended) as to what caused it. Share this post Link to post Share on other sites
Hatchet 0 Posted May 14, 2002 yea this is what I typed: nearestObject[this, "StreetLamp"] switch "OFF" Share this post Link to post Share on other sites
SCLZ 0 Posted May 14, 2002 GAH! Copy and paste! Copy and paste! switchLight! switchLight! nearestObject [this, "StreetLamp"] switchLight "OFF" Edit: Now that error msg makes sense, there is no switch operator... theres a switchLight operator however... (hint hint) Share this post Link to post Share on other sites
Hatchet 0 Posted May 14, 2002 gah lol alright thanks lets see if it works. Share this post Link to post Share on other sites
SCLZ 0 Posted May 15, 2002 I guess silence means it's working... Share this post Link to post Share on other sites
Tales_From_Topographic_Oceans 0 Posted May 15, 2002 Yes, yes, I need to do this. There is an annoying bright light in one of my missions. Not only is it in my eyes, it ruins the effect. Do you have to insert a name in place of this? In some commands, "this" does not mean "this." Share this post Link to post Share on other sites
SCLZ 0 Posted May 16, 2002 The code sample I posted earlier should work when you put it in the init string of he object you place near the street light. Share this post Link to post Share on other sites