Page 1 of 1

J Yelland Signal Scripts

PostPosted: Tue Mar 29, 2022 1:18 am
by Auscgu
Andis,
I have been helping with signals for the NWC LMS 1930s route.
The route uses J Yelland signals and also A Brailsford LNWR signals.
The LNWR signals have been converted to J Yelland scripts to keep a common script for all the signals on the route.

The issue is when you add a extra route with a common arm the arm will not active for both routes.
The first route to use the arm will active and close, but the second will not.
If you change away and active the other route first then the arm works.
The GArmTable below


Code: Select all
--------------------------------------------------------------------------------------
-- COMBINED Home / Home / Home2 / Home Semaphore Signal with 5 routes
--------------------------------------------------------------------------------------

--include=Common UK Semaphore.lua
--include=CommonScripts\Common UK Semaphore Script - Multiple Routes.lua
--include=..\CommonScripts\New Common Signal Script.lua

--------------------------------------------------------------------------------------
-- INITIALISE
--
function Initialise ()

   -- Initialise signal as having 5 route indications
   DefaultInitialise(5)   -- Number must match highest index below
   
   -- Set arm anim names
   gArmTable[1][ARM_HOME][SEM_CHILD_NAME]      = "1Main"
   gArmTable[1][ARM_HOME][SEM_PROCEED_ANIM]   = "Clear01"
   gArmTable[1][ARM_HOME][SEM_BLOCKED_ANIM]   = "Stop01"

   gArmTable[2][ARM_HOME][SEM_CHILD_NAME]      = "2Main"
   gArmTable[2][ARM_HOME][SEM_PROCEED_ANIM]   = "Clear02"
   gArmTable[2][ARM_HOME][SEM_BLOCKED_ANIM]   = "Stop02"

   gArmTable[3][ARM_HOME][SEM_CHILD_NAME]      = "3Main"
   gArmTable[3][ARM_HOME][SEM_PROCEED_ANIM]   = "Clear03"
   gArmTable[3][ARM_HOME][SEM_BLOCKED_ANIM]   = "Stop03"

   gArmTable[4][ARM_HOME][SEM_CHILD_NAME]      = "3Main"
   gArmTable[4][ARM_HOME][SEM_PROCEED_ANIM]   = "Clear03"
   gArmTable[4][ARM_HOME][SEM_BLOCKED_ANIM]   = "Stop03"

   gArmTable[5][ARM_HOME][SEM_CHILD_NAME]      = "5Main"
   gArmTable[5][ARM_HOME][SEM_PROCEED_ANIM]   = "Clear05"
   gArmTable[5][ARM_HOME][SEM_BLOCKED_ANIM]   = "Stop05"

end

Re: J Yelland Signal Scripts

PostPosted: Tue Mar 29, 2022 8:09 am
by AndiS
For all I remember the Kuju scripts perform the open animation and the close animation at the same time. Therefore, you cannot do the trick with double entries in gArmTable that you can do with my scripts.

I confess that I did not check right now. I only remember a load of problems that I got because of my approach and that I got over them using a load of tricks, because I wanted it to look as if one guys operates one lever after the other.

It is much simpler to wait until the new path is established and then put all the arms into their new position.

Plus my approach depends on the animation time of the switches being greater or equal the animation time of the signal arms to look good.

Remember the problems we have with my scripts and diamonds. That is because the diamonds do not have this animation between "old path broken" and "new path set".