| Author |
Topic: Scripting a light |
| Skyguy |
General Member Since: Feb 8, 2006 Posts: 144 Last: Apr 25, 2009 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Feb. 18, 2008 05:44 pm |
 |
Having a tough time scripting a light......inserted a light, clicked "scriptable", gave it a target, targetname, maxmove, yada, yada. Script call is simple right, just trying to make it move. Then tried a trigger to make it move, still nothing. No script errors, the code appears to be fine, but no matter what I do I simply cannot script a light properly.
Has ANYONE got a simple .map with a working scripted light? I read the forum thread about lighting on/off and even tried the sample .map that was posted, and it STILL doesn't work. I'm rather frustrated and am sorry I don't have more info to post.
Tell me what you need to help and I'll do my best to provide it. Or has anyone got one that's working they're willing to share? If it works on my end you'll definitely get credit when my map is released!!
Thanks in advance.
edited on Feb. 18, 2008 12:44 pm by Skyguy |
 |
|
|
| SparkyMcSparks |
 |
General Member Since: Feb 28, 2004 Posts: 1713 Last: Dec 29, 2016 [view latest posts] |
|
|
 |
|
|
| Skyguy |
General Member Since: Feb 8, 2006 Posts: 144 Last: Apr 25, 2009 [view latest posts] |
|
|
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
|
| HarkoninVSC |
General Member Since: Jan 25, 2008 Posts: 294 Last: Apr 24, 2008 [view latest posts] |
|
|
|
|
| .KiLL3R. |
 |
General Member Since: Oct 26, 2006 Posts: 1437 Last: Jul 3, 2017 [view latest posts] |
|
|
|
|
| Pedro699 |
General Member Since: Jun 19, 2006 Posts: 781 Last: Dec 18, 2010 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Feb. 18, 2008 09:15 pm |
 |
Thread here on switchable lights (works by moving the light really quickly)
http://www.modsonline.com/Forums-top-72729.html
My file is still up for download.
I believe this is the same one that you are talking about, and I can assure you it does work.
1. extract from zip
2. compile the map
3. build fast file.
should be good to go.
my xfire is tee699 if you want to discuss any problems with that file.
edited on Feb. 18, 2008 04:18 pm by Pedro699 |
 |
|
|
| Sephyx |
 |
General Member Since: Feb 2, 2008 Posts: 98 Last: Apr 22, 2008 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Mar. 3, 2008 05:18 am |
 |
.KiLL3R. writes...Quote: well, he didnt say it was for MP...
anyway, it is possible to have flickering lights in mp... just that its a bit different than using them functions
So, then how do we go about creating them? I was looking into having a few rooms or a full floor that had a few flickering lights, nothing too crazy but just for added effect. |
 |
|
|
| .KiLL3R. |
 |
General Member Since: Oct 26, 2006 Posts: 1437 Last: Jul 3, 2017 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Mar. 3, 2008 07:37 am |
 |
you could make an fx that makes light
or
use this script
Code: <br />
main()<br />
{<br />
*map stuff here*<br />
<br />
lights = getentarray("light", "targetname");<br />
for(i=0;i<lights.size;i++)<br />
lights[i] thread flicker();<br />
}<br />
<br />
flicker()<br />
{<br />
while (1)<br />
{<br />
wait 0.3 + randomFloat(0.7); // light will be on for 0.3 - 1 seconds<br />
light movez(-10000,0.05);<br />
wait 0.05 + randomFloat(0.05); // light will be off for 0.05 - 0.1 seconds<br />
light movez(10000,0.05);<br />
}<br />
}<br />
make a light and give this
Key: targetname
Value: light
if it doesnt work try ticking the PRIMARY_SCRIPTABLE box |
 |
|
|
| Sephyx |
 |
General Member Since: Feb 2, 2008 Posts: 98 Last: Apr 22, 2008 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|