Jump to content
Sign in to follow this  
Hatchet

Street lights

Recommended Posts

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

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

just tried it, says unknown operator switch

Share this post


Link to post
Share on other sites

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

yea this is what I typed:

nearestObject[this, "StreetLamp"] switch "OFF"

Share this post


Link to post
Share on other sites

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

gah lol alright thanks lets see if it works.

Share this post


Link to post
Share on other sites

I guess silence means it's working... smile.gif

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×