.
Results 1 to 7 of 7

Thread: I need help with a light corona

  1. #1

    Exclamation I need help with a light corona

    I've been at this for a while now, all I want to do is change the default white corona to one of those coronas with glare and colours (like the one used on the Kanawha) , to the locomotive I'm currently working on, so that it at least look palatable.

    While it was able to attach to a.light0, it does not react or toggle in command to the headlight button, it stays 'on' despite the headlight being off, and I've tried to do all sorts that I've seen on other's train assets like changing the effect name from 0 to facula, then again to headlight, and even attempted to code a gs using cannibalised fragments of coding to no avail

    Like seriously my wits has substantially dimmed and have no answers to offer, and I fear that I'm stuck being dependant on the default light corona which don't get me wrong is still exceptionally stellar to see on appropriate locomotives, but if I can't even turn off a light well like, why?

  2. #2
    Join Date
    Nov 2006
    Location
    United States of America, Michagain, Berkley
    Posts
    5,954
    Blog Entries
    6
     

    Default

    Try moving the attachment point up about 10' as it can be working but on the wrong axis.

  3. #3

    Default

    Quote Originally Posted by whitepass View Post
    Try moving the attachment point up about 10' as it can be working but on the wrong axis.
    I tried that, but what it only did is raise the light from the centre mount of the smokebox, it still insists to be on despite the fact that the headlights are toggled off.

    But yeah, I'm super stuck with this problem, but I did figure that I may need to use a .gs file to get the corona to turn off on command. Now what I wrote didn't return an error, but it also didn't toggle the corona off so I'm still stuck trying to solve what should have been simple.

    Here's the gs that I wrote, I have not a gram of clue as to why it refuses to work, any suggestion is welcome.

    include "locomotive.gs"


    class dampfahrtzeugzugmitkohlewassertragerwagen isclass Locomotive {



    public void Init(void) {
    inherited();
    Asset GetAsset, corona_white;



    //================================================== ==============================

    if ((float) GetEngineSetting("headlight") > 0.5)
    {
    SetFXCoronaTexture("headlight0", corona_white);
    }
    else
    {
    SetFXCoronaTexture("headlight0", null);
    }


    //================================================== ==============================
    }
    };
    Last edited by Annedzsrue; August 17th, 2022 at 11:21 PM.

  4. #4
    Join Date
    Nov 2006
    Location
    Republic of Texas
    Posts
    1,043
     

    Default

    Have you tried nesting the corona attachment inside the "default-night-forward" container?:
    https://online.ts2009.com/mediaWiki/...sh-table_Usage

    for example:

    Code:
    mesh-table
    {
       model
       {
          mesh                                "model.lm"
          auto-create                         1
       }
    
       default-night-forward
       {
          mesh                                "model-containing-attachment-point.im"
          auto-create                         0
    
    
          effects
          {
             headlight-flare
             {
               kind                            "corona"
               att                             "a.flareattachmentpoint"
               texture-kuid                    <kuid2:corona:kuid:1>
             }
          }
       }
    }
    the neat thing about this container is it doesn't need any special script file to control it as it is part of the base game functionality.

  5. #5

    Default

    Not gonna lie I never thought of that, thank you so much for that information.

    With that conundrum out of the way, I hope you don't mind me asking, how do I go on about making screwlinks that couples onto the next car? from what I've seen on more recent uploaded assets at least, it uses two meshes with differing states: hooked and unhooked, is it possible to configure it on the config file or do I need a .gs file?

    Again, I'm really thankful for the container.

  6. #6
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    3,866
    Blog Entries
    1
     

    Default

    Quote Originally Posted by Annedzsrue View Post
    Not gonna lie I never thought of that, thank you so much for that information.

    With that conundrum out of the way, I hope you don't mind me asking, how do I go on about making screwlinks that couples onto the next car? from what I've seen on more recent uploaded assets at least, it uses two meshes with differing states: hooked and unhooked, is it possible to configure it on the config file or do I need a .gs file?

    Again, I'm really thankful for the container.
    Hi Annedzsrue
    I would recommend taking a look at the 'VR' freight wagons and steam locomotuives under my personal username 'S301' on the Download Station. These include scripts that will allow the screwlinks to couple, using the 'ACS' coupler system. It requires a few config tags, as well as a suitable mesh (mine use a mesh-library system, which allows anyone to use the meshes in their own assets via the mesh-asset tag, so you could simply use this if you prefer), the appropriate part of the 'gs' file (aka the script).

    Regards
    Zec Murphy

    Customer Support Rep
    N3V Games (Auran)

    *Please do not use Private Messages for support. Support can only be provided via the helpdesk, or via the forums.

  7. #7

    Default

    Hi Murphy,
    I have actually looked around well more of done an autopsy to your and other's rolling stocks with ACS enabled screwlink couplers, just to study how the animated couplings worked through Script & Config, when you have suggested to another user to also check out your VR rollingstocks. I hope that is alright with you.

    While I have already prepared meshes of my own, I have tried to use other authors' coupler libraries/ assets, though all of them are made too high for my locomotives so I had to make an ACS mesh stock regardless.

    Now I still have yet to write my own script, and I've actually began using AJS's Superscript to test out if my ACS couplers are functioning, but I have made great strides on my understanding or at least I feel like I understand what was written down in an ACS themed scripting. However just out of curiosity, is there a scripting tutorial that revolves heavily on ACS scripting? just to really understand the ACS scripting rather than only having context to study. I did try copying segments of your script onto my gs file script prior to finding out about the AJS superscriptit returned faulty, hopefully I don't need to copypaste blindly this time, and actually know what I am writing down.

    Still, thank you for your help and your suggestion to look around your rollingstock, there's a chance I would've given up and settled for fictional janney couplers over screwlinks if I hadn't considered studying your assets.

Tags for this Thread

Posting Permissions

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