+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Administrator snypir is on a distinguished road snypir's Avatar
    Join Date
    May 2008
    Location
    United States
    Posts
    174
    Reviews
    Read 0 Reviews
    Rep Power
    10

    model change script request

    There was a script for switching models, it was for the flickering light fixture in the SP blackout map I think. It switched the on/off models of a fixture. It was in a thread at modsonline but I can't find it. If anyone knows the script I'm talking about I'd appreciate if they could post it or point me to it.

  2. #2

  3. #3
    Administrator snypir is on a distinguished road snypir's Avatar
    Join Date
    May 2008
    Location
    United States
    Posts
    174
    Reviews
    Read 0 Reviews
    Rep Power
    10
    thanks, I did finally find it.

    Code:
    main() { 
      precacheModel("com_studiolight_hanging_off"); 
      thread flicker(); 
    } 
    flicker(){ 
      while (true){ 
        speed = .01; 
        height = -36; 
        spotlight_hide = getent("spotlight_hide", "targetname");
        spotlight_model = getent( "spotlight_model", "targetname");
        if(isdefined(spotlight_model) && isdefined(spotlight_hide)){
           wait(randomfloat(0.6));       
           spotlight_hide movez (height, speed); 
           spotlight_model setmodel( "com_studiolight_hanging_off"); 
           spotlight_hide waittill ("movedone");
           wait(randomfloat(0.4)); spotlight_hide movez (height - (height * 2), speed); 
           spotlight_model setmodel( "com_studiolight_hanging_on" );  
           spotlight_hide waittill ("movedone"); 
        } else { 
           wait(6); 
           iprintlnbold ("Warning !!! - missing assets"); 
        } 
      } 
    }

    This is what I was looking for, but what I ended up doing was making an FX that did what I wanted.


    http://www.xfire.com/video/563bd9
    Last edited by snypir; April 11th, 2012 at 09:43.

Posting Permissions

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