Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Scripting a light
Skyguy
General Member
Since: Feb 8, 2006
Posts: 144
Last: Apr 25, 2009
[view latest posts]
Level 4
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
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Monday, Feb. 18, 2008 05:49 pm
I thought those only worked in SP.
If I recall, one of the devs said scriptable lights to turn on/off and flicker can only be done in SP.
Share |
Skyguy
General Member
Since: Feb 8, 2006
Posts: 144
Last: Apr 25, 2009
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Monday, Feb. 18, 2008 05:55 pm
Ok, tried it again and now it works.............I'll try inserting them from my test map into my full map and see if it works.

I must have missed something in the gsc in the transfer.

Apologies.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Monday, Feb. 18, 2008 06:19 pm
you got it working for mp? please show me how :)


Module: Entity
SP Only

setlightcolor
setlightexponent
setlightfovrange
setlightintensity
setlightradius
Share |
HarkoninVSC
General Member
Since: Jan 25, 2008
Posts: 294
Last: Apr 24, 2008
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Monday, Feb. 18, 2008 06:35 pm
Agreed, do you mind posting your code?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Monday, Feb. 18, 2008 06:41 pm
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
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
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
Share |
Sephyx
General Member
Since: Feb 2, 2008
Posts: 98
Last: Apr 22, 2008
[view latest posts]
Level 3
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.
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
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
Share |
Sephyx
General Member
Since: Feb 2, 2008
Posts: 98
Last: Apr 22, 2008
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Monday, Mar. 3, 2008 03:41 pm
cool ty
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»