Problems with new light source

Sirren67

Look, Ma! Two Heads!
I need to destroy a huge amount of light sources at a given time in my town...
Attaching the same script to the regular ones kinda crashes the mapper, when i do it MANY times in a row.
I made a new source with built in script, but I have this trouble: If I use the "block" art I can't see it (even if I turn hidden obj visibility on). If I use the light art it does not turn invisible. I can have it turn invisible via script, but at this point it produces no light...
Is the thing hardcoded, or I can bypass it someway?
Or, is it better to destroy light sources via map script?
Thanks in advance. Bye.
 
not entirely sure what you're trying to do..

flip a switch and all the city's light go out?

please elaborate on what you're trying to do..
 
SPOILER!!!!
5
4
3
2
1
Six/twelve months before the war there are riots in towns and cities. Riots are "settled" by the army. My demo takes place in a relatively calm zone of a town suburbs. A few days after the beginning of the game the army cuts power in the main town. In the demo this is only used to suggest there's something strange going on in the main town (along with TV broadcasting disrupted).
The demo contains two zones: Suburbs and a Poseidon Oill compound (wich has its own power sources). I can't simply destroy ALL light sources with a "destroy obj type" like command because I have one HUGE mixed map linking the two town zones.
Bye, ColJack.
 
i didn't need the spoiler.. and you still didn't explain clearly exactly what you're trying to do..

anyway.. i'm going to make several asumptions here..

1. your suburbs setting is going to be at night?

2. your suburbs is something like new reno.. streets with buildings..?

since i've not touched the editor for over a year now, my memories of it are scetchy at best.. so bear with me on the next bit..

do i seem to vaguely recall that some lamposts give off light without having to put light sources under them??

i also seem to vaguley recal that you can have any proto giving off light? ( glowing ghouls..? )


ok, so while typing this, i've re-installed F2, and the editor just for you... ( damn you to hell for dragging me back in... :) )

indeed proto's can emit light, just set the light level and radius in it's proto...

so just put in street lighting, and when the "power" gets cut, the light proto switches out for one that is not giving off light ( need to make a proto with same artwork but no light output since the other lamposts look detroyed.. )

if i can get my hands on the toxic mod files i made for altrawave then i can give you code examples.. but since it's past midnight here, you'll have to wait until tomorrow.... :twisted:
 
Hi ColJack. First of all, please accept my apologies for dragging you back into the unhealthy (and insane) business of Fo2 modding :D .
Now:
1) No, suburbs have normal Lighting cycle.
2)Yes, it's something like Reno: rough place with streets and buildings.
3) There are posts wich emit light, but I should use regular street lights, the ones emitting a spotlight not centered with the proto. This is why I have to use light sources. Protos can emit light, but then it's centered on the proto in this case.
4)You can "switch" protos places? Uhm, VERY interesting, and not only about my current matter. Thanks for your assistance.

For NMA moderators: Since the spoiler wasn't really needed, may I edit my previous post and turn it in something less "juicy"?
Bye.
 
yes it's easy to do.. providing you know the proto numbers or names ..

here is the code to switch "dead" computer screens and terminals with their flashing counterparts when the power comes on..


Code:
procedure map_update_p_proc begin
   variable Item;

   if (global_var(GVAR_SIERRA_BASE_POWER) == 1) then begin
       if (obj_pid(self_obj) == PID_V15_EW_MON_BROKE) then begin
           item:=create_object(PID_V15_EW_MON_WORK,tile_num(self_obj),elevation(self_obj));
       end
       else if (obj_pid(self_obj) == PID_V15_NS_MON_BROKE) then begin
           item:=create_object(PID_V15_NS_MON_WORK,tile_num(self_obj),elevation(self_obj));
       end
       else if (obj_pid(self_obj) == PID_V15_EW_COMP_BROKE) then begin
           item:=create_object(PID_V15_EW_COMP_WORK,tile_num(self_obj),elevation(self_obj));
       end
       else if (obj_pid(self_obj) == PID_V15_NS_COMP_BROKE) then begin
           item:=create_object(PID_V15_NS_COMP_WORK,tile_num(self_obj),elevation(self_obj));
       end 
   end
end
 
Back
Top