Results 1 to 1 of 1

Thread: "Dynamic" lights with dx7

  1. #1
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts

    "Dynamic" lights with dx7



    A friend (Radio-xf: walkingcodradio) told me that there was a way to make dynamic lights without using DirectX 9 + dynamic light effects. I tested it and it seems to work fine. Players will have those annoying light bugs (bright/dark models) though, but doesn't matter ^^. Also use this with a few script_brushmodels since there's a max of it (256 iirc)

    How to do it?

    1- Make a script_brushmodel with no lights. Give it a targetname, for example: "lights_off".
    2- Make another script_brushmodel, in a different position of the first one. Light the script_brushmodel at your own, and give it another targetname, for example: "lights_on".
    4- Make sure you align the textures in both of the script_brushmodels, otherwise it would look weird.
    5- Make a trigger to activate them and give it a targetname, for example: "trig_lights".
    6- Copy this script:

    PHP Code:
     lights()
    {
     
    off getent("lights_off","targetname");
     
    on getent("lights_on","targetname");
     
    trig getent("trig_lights","targetname");
     
    wait .1;
     
     
    on movez(-392,0.01); //change this to move the "lights_on" brushmodel to the exact position the "lights_off" is.
     
    on hide();
     
    while(
    1)
     {
     
    trig sethintstring("Press [USE] to turn ^2ON ^7the lights");
     
    trig waittill("trigger");
     
    wait .5;
     
    on show();
     
    off hide();
     
    trig sethintstring("^1Wait :p");
     
    wait 3;
     
    trig sethintstring("Press [USE] to turn ^1OFF ^7the lights");
     
    trig waittill("trigger");
     
    wait .5;
     
    off show();
     
    on hide();
     
    trig sethintstring("^1Wait :p");
     
    wait 3;
     }

    Last edited by pollo; 13th October 2014 at 22:02.

  2. The Following 2 Users Say Thank You to pollo For This Useful Post:

    MeGaBooM (15th October 2014),Ni3ls (14th October 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •