Creation Sharing Diary Of Creating A Route - Toronto Subway Opening Day

Discussion in 'PC Editor Discussion' started by pwilson79, Nov 5, 2023.

  1. gm3161

    gm3161 Active Member

    Joined:
    Mar 20, 2024
    Messages:
    99
    Likes Received:
    180
    Finding this thread truly fascinating and interesting.
     
    • Like Like x 1
  2. Dinosbacsi

    Dinosbacsi Well-Known Member

    Joined:
    Sep 20, 2017
    Messages:
    3,815
    Likes Received:
    9,733
    That interior is really starting to look lovely!
     
    • Like Like x 1
  3. pogodoyle#7387

    pogodoyle#7387 Well-Known Member

    Joined:
    Aug 21, 2021
    Messages:
    351
    Likes Received:
    948
    What a fascinating thread! You've inspired me to dust off the UE4 book and have another go myself! I made a start on Workington ages ago, but got bogged down with the buildings, and now that JT are doing Carlise-Whitehaven there's no point anyway.

    I think my learning route has to be my adopted home, so Bath-Bristol it is! I was daunted by the idea of trying to recreate Bristol in particular, but this blosm tool might just be my saviour :D

    Thanks for sharing, and continued good luck with this inspiring project!
     
    • Like Like x 1
  4. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    429
    Likes Received:
    578
    First of all, thanks for the kind words, gm3161 , Dinosbacsi a and pogodoyle#7387 !

    Unfortunately, half the long weekend has gone by, and I have nothing to show for it. :(

    When I simulate the timetable with an unload instruction, it still gets stuck at "Trigger door lock state 0 for service NewService," which makes me think the systems the AI driver and the tab menu use are the same. I'm starting to think I may not be able to set up the AI or tab menu door operations properly, at least not without somehow getting a look at an uncooked working example of a DoorBaseComponent. These are separate component assets usually named "(routename)_PassengerDoors," saved as a separate asset that gets added to the RVM, with array variables for left and right Rail Vehicle Door Components , and some have arrays for some kind of Model Components for the doors, and/or a reference to the (presumably) owner RVM.

    I think it may be down to the default parent class of the DoorBaseComponent missing functions that working DoorBaseComponent's have, or perhaps me just not knowing what to do with them. I just can't get the tab menu to show buttons for unlocking or locking my doors, using my own DoorBaseComponent.

    I can add another passenger car's DoorBaseComponent to my RVM, and get it to work with the tab menu correctly, but this is something I've been moving heaven and earth to try to avoid.

    If anyone has worked this out, or thinks they may know what I've been missing, please let me know! Otherwise, I may have to set the whole thing aside for a day or two, and maybe circle back to it after working on other parts of my plugin as well.

    Update: Not being one to let sleeping dogs lie, I have made some progress! I think what was needed was actually a VehiclePassengerDoors Component, and maybe a DoorControls component, freshly made from their respective Core parent assets. At least I think I got the names right; It's late, and I don't feel up to firing up the editor again tonight.
     
    Last edited: May 18, 2026
    • Like Like x 1
  5. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    429
    Likes Received:
    578
    I have deduced that the VehicleDoorControl components are almost certainly created and added to the RVM during runtime, likely by the VehiclePassengerDoors component, something like this:

    ScreenHunter_345 May. 19 18.45.jpg

    I hope I'm barking up the right tree with this approach. Moreover, if more setup is required for tab menu interaction, I'm not sure how to work out what needs to be done. It may take a few days for me to find out in any case; I feel like I've been obsessing over the door problem, so I'm trying to take things a little bit slower.
     
  6. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    429
    Likes Received:
    578
    Obsessed or not, I've been turning over this door problem in my head quite a bit.

    Recently, I was pleased to discover that by changing the value of an enum or boolean (I forget now exactly which) from the PassengerDoors component, I could get the option to lock to appear in the pop-up menu, whereas before it had been greyed out. I felt like I could be on the verge of solving the problem. My tired mind conjured up an image of me pinning an opponent to the mat in a wrestling ring.

    But then try as i might, I still couldn't find a way to register when a button on that pop-up menu is pressed, so that I can direct the execution flow accordingly! In my mental wrestling match, my pinned opponent now became Curly Howard from the Three Stooges, and started spinning around in circles going "Whoop whoop whoop whoop!"
    curly.gif

    But I see now that there are Event Dispatchers that come with the PassengerDoors component:
    ScreenHunter_346 May. 24 13.24.jpg
    and also this oddity in the Bakerloo 38-Stock PassengerDoors:
    ScreenHunter_345 May. 24 13.09.jpg
    so now with any luck, and depending on how the mysterious and unknown menu widget is set up, I just have to learn everything I can about Event Dispatchers and binding, and delegates, and eventually I will find some configuration that drives execution somewhere, on something, when I press one of the pop-up menu's buttons.

    Oh, and I will still have to somehow make sure it co-operates with the AI for loading/unloading.
     
  7. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    258
    Likes Received:
    610
    Good to hear you are making progress, albeit with discouraging steps along the way as we expect from the Editor.

    I think the Event Bind Door node is part of the Event Dispatcher .

    I've recently been messing about with Event dispatcher for the HUD as it's away to send various parameters from one blueprint to another (or indeed several others) when you send the "message".

    If it would help I could send a screen print of "both ends" of me Event Dispatcher but bit stuck at the moment.(hopefully later today)
     
  8. pwilson79

    pwilson79 Well-Known Member

    Joined:
    Apr 18, 2021
    Messages:
    429
    Likes Received:
    578
    Yes please! Only iwhen you have a spare moment, though. I still don't have much of a "feel" for event binding yet, and any example would be quite welcome!
     
  9. Daunfr59

    Daunfr59 Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    258
    Likes Received:
    610
    No problem - just a few real life events getting in the way !

    I used the Event Dispatcher to send all the values from the RVV to the HUD but the "source" blueprint sends out the message (when triggered) and it can be picked up by anyone who is listening.

    In the source blueprint (RVV in this example) you add an Event Dispatcher and give it a suitable name (Update HUD) in my case.
    In the details panel you can add as many variables as you like and these can be floats, integers, booleans or any other type.(I have added four floats and one integer variable for the various readings in the HUD.

    In the Event graph you create a trigger event (I 'm using a timer to call the Update every few second) but I guess you can use any trigger such as a key press or "On Output Change".

    Here is the picture of the event graph in my RVV.

    RVV CallEventDispatcher.jpg

    The red box is the trigger and the stuff in the middle is simply functions which I use to update the variables (get speed etc.).
    The important one is the CALL "Event Dispatcher" at the end which sends the signal out every time the trigger fires. The green dots are the variables I am sending with the message.


    In the receiving blueprint (or blueprints) you need a reference (or a cast) to the source and then you bind to the event dispatcher as shown below.
    I think you are supposed to do this in the Construction Script but as the HUD doesn't have one I used an Event Construct.

    The binding only needs to be done at the start (Construction script or Event begin play) and then the receiving blueprint will listen for the signal.

    HUD_Bind to Event Dispatcher.jpg

    In the Bind Event node you drag off the Red Event node and create a Custom Event for the action you want happen. (in this case update the Boiler Pressure in the HUD).
    I then drag off the boiler Pressure node to get the current pressure sent in the "signal".

    You need a Bind Event node for every variable you want to act on so I have a chain of 5 (each with it's own custom event) but I haven't shown all this as it will just cause confusion.

    The important node is the Bind Event to the despatcher and the custom event you want to happen when the "signal" is received.

    Hope I'm not "teaching my grandmother to suck eggs" and that this will be helpful. Let me know if you need anything else.

    It occurs to me that the Tab Menu which appears on screen is a type of interactable HUD Widget so you will probably use that as the source blueprint and send the "message" (lock/unlock) to the RVM or RVV of the vehicle (or perhaps all of them) so it will be a mirror image of my example.

    Good luck as always. I hope to be following in your footsteps soon with my Auto Coach.
     
    • Helpful Helpful x 1

Share This Page