Did you call all the sciprt_origin lamps? or do you mean lamps1, lamps2, etc.
If you give all the script_origins the same name, it will not work.
Also, the script doesn't look right to me.
FX with multiple origins - same targetname.
Moderator: Core Staff
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
well you would have to give them a different name each: lamps1, lamps2, lamps3
you can't have more than one origin have the same name.
you can't have more than one origin have the same name.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
No, the method is fine, you are using an array and therefore you do NOT have to have different names...
The problem is your coding...
Ok, so above, we no have an array of lamps and every lamp now is threaded to a function.
Now, for some reason, you have chosen to detect the lamp again, you do not need to, you threaded the lamp above...
Also, the "level._effect" should be put in your main, not your function.
And another thing, is your "loopfx" function is wrong... This is what it should be referring to...
loopfx(fxId, fxPos, waittime, fxPos2, fxStart, fxStop, timeout)
fxId = Name of FX
fxPos = Origin
waittime = how many times a second should the fx be played
fxPos2 = direction origin
The last 3, you can ignore...
So, change this code to the following...
Or you can rewrite the entire thing to..
Although, this entire script would be more map efficient if you did not use the script_origins and just used numbered origins
The problem is your coding...
Code: Select all
lamp_effects()
{
lamps = getentarray("lamps","targetname");
for(i=0;i<lamps.size;i++)
lamps[i] thread lamps_fx ();
}
Code: Select all
lamps_fx()
{
lamps = getent("lamps","targetname");
level._effect["fire"] = loadfx ("fx/fire/flame_small_em.efx");
maps\mp\_fx::loopfx("fire", ("lamps"), 0.6);
}
Also, the "level._effect" should be put in your main, not your function.
And another thing, is your "loopfx" function is wrong... This is what it should be referring to...
loopfx(fxId, fxPos, waittime, fxPos2, fxStart, fxStop, timeout)
fxId = Name of FX
fxPos = Origin
waittime = how many times a second should the fx be played
fxPos2 = direction origin
The last 3, you can ignore...
So, change this code to the following...
Code: Select all
lamps_fx()
{
maps\mp\_fx::loopfx("fire", self.origin, 0.6, (self.origin + (0,0,1));
}
Code: Select all
lamp_effects()
{
lamps = getentarray("lamps","targetname");
for(i=0;i<lamps.size;i++)
maps\mp\_fx::loopfx("fire", lamps[i].origin, 0.6, (lamps[i].origin + (0,0,1));
}
Although, this entire script would be more map efficient if you did not use the script_origins and just used numbered origins
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Also, another thing to note, if you are using the normal lantern (like you see around CoD2 maps) you can do so very easily...
Just load the prefab
"prefabs\lamps\lantern_lit.map"
Place it where you want...
In your GSC file make sure the following is present:
maps\mp\_load::main();
and compile and play.
Just load the prefab
"prefabs\lamps\lantern_lit.map"
Place it where you want...
In your GSC file make sure the following is present:
maps\mp\_load::main();
and compile and play.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 2 guests