Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

[Suggestion] Allow interior light / spotlight color change through programmable block

Discussion in 'Programming Questions and Suggestions' started by w0lf3y, Jan 11, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. w0lf3y Apprentice Engineer

    Messages:
    152
    According to the official guide at http://steamcommunity.com/sharedfiles/filedetails/?id=360966557

    interior light and spotlight do not have RGB fields or actions to set/get

    Code:
    
    Interior Light                                          Spotlight
    Interface name: IMyInteriorLight                        Interface name: IMyReflectorLight
    Parent: IMyLightingBlock                                Parent: IMyLightingBlock
    Parent: IMyFunctionalBlock                              Parent: IMyFunctionalBlock
    Fields:                                                 Fields:
    float Radius                                            float Radius
    float Intensity                                         float Intensity
    float BlinkIntervalSeconds                              float BlinkIntervalSeconds
    float BlinkLenght                                       float BlinkLenght
    float BlinkOffset                                       float BlinkOffset
    
    Actions:                                                Actions:
    OnOff -> Toggle block On/Off                            OnOff -> Toggle block On/Off
    OnOff_On -> Toggle block On                             OnOff_On -> Toggle block On
    OnOff_Off -> Toggle block Off                           OnOff_Off -> Toggle block Off
    IncreaseRadius -> Increase Radius                       IncreaseRadius -> Increase Radius
    DecreaseRadius -> Decrease Radius                       DecreaseRadius -> Decrease Radius
    IncreaseBlink Interval -> Increase Blink Interval       IncreaseBlink Interval -> Increase Blink Interval
    DecreaseBlink Interval -> Decrease Blink Interval       DecreaseBlink Interval -> Decrease Blink Interval
    IncreaseBlink Lenght -> Increase Blink Length           IncreaseBlink Lenght -> Increase Blink Length
    DecreaseBlink Lenght -> Decrease Blink Length           DecreaseBlink Lenght -> Decrease Blink Length
    IncreaseBlink Offset -> Increase Blink Offset           IncreaseBlink Offset -> Increase Blink Offset
    DecreaseBlink Offset -> Decrease Blink Offset           DecreaseBlink Offset -> Decrease Blink Offset
    
    
    Please allow us to modify these additional values through the programmable block.

    Potential benefits include:

    allowing us to use less lights overall
    allowing a more immersive experience
     
    Last edited by a moderator: Jan 11, 2015
  2. Masked Death Apprentice Engineer

    Messages:
    315
    Generally that seems not to be in since there are no blocks where you can set a value, you only can use increase/decrease functions. Setting a value needs to be added in, then we can have our automatic lights (and disco scripts).
     
  3. GamesOmatic Trainee Engineer

    Messages:
    70
    in/decrease rgb would work
     
  4. w0lf3y Apprentice Engineer

    Messages:
    152
    I would certainly hope for a
    Code:
    light.colorRGB(255,255,255).apply();
    
    format versus
    Code:
    int r = light.colorR
    int g = light.colorG
    int b = light.colorB
    while (light.colorR <= 255){
         light.colorR(r).apply();
         };
    while (light.colorG <= 255) {
         light.colorG(g).apply();
         };
    while (light.colorB <= 255) {
         light.colorB(b).apply();
         };
    
    I guess i just think that if someone wants a tricolor light (red / white / green) they should be able to set light(r,g,b) and be done with it, not have to retrieve current value, step through to new value by an in/decrease function
     
  5. w0lf3y Apprentice Engineer

    Messages:
    152
    ZING! all the way to the bank.

    Thank You KSH
     
Thread Status:
This last post in this thread was made more than 31 days old.