[lua] Activatenode Question

Discussion in 'General Discussion' started by Ingwar, Jan 13, 2026.

  1. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    How can I find the list of the nodes of the model, that I can actually active/deactivate? Are they under <TransformName> in GeoPcDx file?
     
  2. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    1,221
    Likes Received:
    5,425
    Yes, the transform names are the ones you can switch. These are basically mesh objects.
     
    • Helpful Helpful x 1
  3. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    Thank you, Maik. I have noticed weird thing. I can activate/deactivate nodes on the engine in free roam scenario before I actually posess it by pressing on it. But after that all my activations dissappear and the engine returns to its default state. How can I prevent it? Im changing nodes state inside the Update function, because in Initialise they dont work.
     
  4. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    375
    Likes Received:
    341
    You will get trouble if you try to hide/show nodes that are linked to TS core functions. Such as lights. You can also not hide animations this way.
    Are you doing it inside the original script, or have you made a new script thar requires/loads the original script?
     
  5. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    I have made a new script, that requires the original script. And yes, I was trying to show hide headlights. From your words I assume it is not possible?
     
  6. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    375
    Likes Received:
    341
    If you are not gonna use the original light nodes, you could make the light textures fully black (make it invisible) Then you could add your own light as child to the engine.
     
    • Helpful Helpful x 1
  7. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    Great idea, thank you Oystein!
     
  8. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    I have found even better solution. I have renamed headlight control section in engine blueprint, so TS cannot find it. And control headlights completely manually. This way there is no need to change default flare textures. They are just left alone.
     
  9. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    375
    Likes Received:
    341
    Yes, that is also possible. But you might not be able to use HUD to control the lights.
     
    • Helpful Helpful x 1
  10. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    You are right, did not think about it this way.
     
  11. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    I have got another question about the topic. Will ask here, as it is related.
    How do I tell Railworks to activate a node in a cab model? Or ActivateNode will search for it by name in both main model and cab model?
     
  12. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    375
    Likes Received:
    341
    For every solution you find in TSC you will run into another problem, especially when you are trying to bypass TS core functions :)
     
  13. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    375
    Likes Received:
    341
    For this you need to add a "Interior Visibility Object" to a control value. No scripting required.
    In this example, the node in the cab geopcdx named "notchanim" will be displayed between a value of 0 and 0.37.
    BlueprintEditor2_9EEM4AhWXX.png
     
    • Helpful Helpful x 1
  14. Ingwar

    Ingwar Member

    Joined:
    Apr 19, 2024
    Messages:
    123
    Likes Received:
    21
    Thank you!
     

Share This Page