Creator Newbie Help!

Discussion in 'General Discussion' started by brendan#3857, Mar 5, 2026.

  1. brendan#3857

    brendan#3857 New Member

    Joined:
    Apr 4, 2025
    Messages:
    5
    Likes Received:
    6
    Hi there,
    As a retirement project I've embarked on a project to create an Irish route and Irish locomotive.
    I have created a GM class 141 loco, and successfully set up a cab and throttles.
    Much work remains to be done, but one issue is that the keyboard map doesn't work.
    I note that some locos seem to use the default and don't specify any mapper in the blueprint, and some use their own input mappers. Whatever I try, nothing works. I could still drive using the hud or controls, but still..
    I've used Tony Nicholls excellent tutorial videos btw, does he contribute here? Much thanks to him for helping me get as far as I have.
     
    • Like Like x 2
  2. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    396
    Likes Received:
    349
    Input mapper blueprint must be exported manually (right click->Export in Blueprint Editor), and it must be located in a folder named "InputMappers"
    In the engine blueprint, add the name of the input mapper just like it appears in the first field inside the input mapper. Don't use the path or name of the input mapper file.
    Restart game after editing the input mapper.

    Also, make sure that you have a working engine script with at least the following code;
    Code:
    ------------------------------------------------------------
    -- OnControlValueChange
    ------------------------------------------------------------
    -- Called when a cab control is modified
    ------------------------------------------------------------
    -- Parameters:
    --    name    = Name of the control
    --    index    = Index of the control
    --    value    = Modified control value
    ------------------------------------------------------------
    
    function OnControlValueChange ( name, index, value )
    
        if Call( "*:ControlExists", name, index ) then
    
            Call( "*:SetControlValue", name, index, value );
    
        end
    
    end
    I hope this helps!
     
  3. mrscott2022

    mrscott2022 Active Member

    Joined:
    Jul 29, 2022
    Messages:
    161
    Likes Received:
    107
    I also used his tutorials to get started making content. I wish he was still making videos. Sadly there is not much out there on this topic. What info that is out there is not thorough enough, or it's just simply outdated.
     
  4. brendan#3857

    brendan#3857 New Member

    Joined:
    Apr 4, 2025
    Messages:
    5
    Likes Received:
    6
    Thanks guys. I really didn't expect such a quick response. I'll keep you posted on progress, as help for anyone else trying this.
     
  5. brendan#3857

    brendan#3857 New Member

    Joined:
    Apr 4, 2025
    Messages:
    5
    Likes Received:
    6
    Ten million thanks, the .lua file was blank. If I'd looked at the sample .lua I'd have seen the script. THanks Oystein...and it's great to see this forum is not dead!
     
    • Like Like x 2
  6. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    396
    Likes Received:
    349
    I'm glad it worked! Keep us updated on the GM Class 141 :)
     
  7. brendan#3857

    brendan#3857 New Member

    Joined:
    Apr 4, 2025
    Messages:
    5
    Likes Received:
    6
    OK here's another question.
    I'm animating the dials in the cab. The speedometer is the obvious one.
    Provided the needle is in a plane such that only one angle of rotation is required everything is fine.
    But to animate the needle in a plane (ie on the cab sloping dashboard) seems to require the needle to be the child of an empty.
    With the empty aligned corectly the needle will rotate in the plane. But it will not display in the cab in-game. Including the needle animation in the blueprint causes the needle to disappear.
    I'm pretty sure I'm on the right track because I seee the needles in Tony's cab are aligned and are children of empties. Just missing a bit of information.
     
  8. Oystein

    Oystein Well-Known Member

    Joined:
    May 24, 2018
    Messages:
    396
    Likes Received:
    349
    If you are using Blender, you can set the transform of the mesh to "Quaternion", then you can animate with the local orientation of the mesh.
     
    • Like Like x 1
  9. brendan#3857

    brendan#3857 New Member

    Joined:
    Apr 4, 2025
    Messages:
    5
    Likes Received:
    6
    Thanks!! I was looking at quaternions but shied away from it.
    Having done some reading I figured it out. The advantage is that one only needs to specify the first, middle and final location and the animation figures out the rest. The disadvantage is that it's a bit fiddly to set up the locations, you need to rotate using the mouse, you can't edit individual values of xyz and w becasue they're all interrelated.
    I still think there must be a way using normals, but this is fine for the moment.
    Again, thanks to Oystein for the lead.

    Fun fact: quaternions were first described by Irish mathematician William Hamilton in 1843, and there is a plaque celebrating this fact on Broom Bridge in Dublin, crossing the Dublin-Sligo railway line.
     
    • Like Like x 2

Share This Page