Signal Scripting Advice | Request_to_pass_danger Message

Discussion in 'Creation Centre' started by Majk369, May 8, 2024.

  1. Majk369

    Majk369 New Member

    Joined:
    Apr 22, 2023
    Messages:
    1
    Likes Received:
    0
    Hello,

    in the last couple of weeks I've been working on my first signal pack. Since I already have some experience with 3d modelling and texturing, that part was not new to me, what however was, was the scripting part. With the help of the official developer documentation and inspection of the Kuju signal scripts (whose source code is available in the Assets folder) I have managed to create something, which almost filled my original expectations for what I wanted to create.
    There is however one very important functionality missing, and that is the ability to use the Request to pass at danger function in scenarios. At first I couldn't even get the button to activate in the F1 HUD, then I found out that in order for the game to know what sort of aspect is being shown on the signal head, it must also display the 2D map state. After I have set that up, I could finally click the button when a signal was showing a BLOCKED aspect.
    The thing is, that there is a signal message reserved for this action in the scripts, which is in the Kuju scripts called REQUEST_TO_PASS_DANGER with code 4. But when I click the button in the scenario, the message never actually gets sent, I have added a ScenarioManager:ShowAlertMessageExt function (which I generally use for debugging) to pop up whenever a signal receives any message (in the OnSignalMessage function). All expected message show up but not this one. So obviously I cannot add any ReactToSignalMessage option that would handle this message, when it arrives (because it doesn't arrive).
    Maybe the message is an obsolete way of doing things, since the Kuju scripts are 15 years old.

    If anyone knows how to handle these "requests to pass at danger" in scripts, your advice will be appreciated.
     

Share This Page