Hola a todos,
Quisiera incorporar a una ruta una señal luminosa repetidora, es decir, que repita el estado en que se encuentre la siguiente señal. ¿Alguien sabe como implementarla?
Saludos,
Moderador: Moderadores
SignalType ( "ESRNIndSal"
SignalFnType ( DISTANCE )
SignalLightTex ( "indsaltex" )
SignalLights ( 1
SignalLight ( 0 "White Light"
Position ( 0 2.9 0.21 )
Radius ( 0.3 )
)
)
SignalDrawStates ( 2
SignalDrawState ( 0
"Unlit"
)
SignalDrawState ( 1
"Pass"
DrawLights ( 1
DrawLight ( 0 )
)
)
)
SignalAspects ( 2
SignalAspect ( APPROACH_1 "Unlit" )
SignalAspect ( CLEAR_1 "Pass" )
)
)
SCRIPT ESRNIndSal
// Señal indicadora de salida: muestra el estado de la señal de salida
extern float block_state ();
extern float route_set ();
extern float next_sig_lr ();
extern float def_draw_state ();
extern float state;
extern float draw_state;
extern float enabled;
float next_state;
next_state = next_sig_lr (SIGFN_NORMAL);
if ( next_state ==# SIGASP_STOP || next_state ==# SIGASP_STOP_AND_PROCEED)
{
state = SIGASP_APPROACH_1;
}
else
{
state = SIGASP_CLEAR_1;
}
// Get draw state
draw_state = def_draw_state (state);
1: next_state = next_sig_lr (SIGFN_NORMAL);
2: if ( next_state ==# SIGASP_STOP || next_state ==# SIGASP_STOP_AND_PROCEED)
{
3: state = SIGASP_APPROACH_1;
}
4: else
{
5: state = SIGASP_CLEAR_1;
}
1: next_state = next_sig_lr (SIGFN_NORMAL);
2: if ( next_state ==# SIGASP_STOP)
{
3: state = SIGASP_APPROACH_1;
}
4: else if ( next_state ==# APPROACH_2 || next_state ==# APPROACH_3 )
{
5: state = SIGASP_APPROACH_2;
}
6: else
{
7: state = SIGASP_CLEAR_1;
}
[...]
///////////////////////////////////////////////////////////////////////////////
SCRIPT JpDistance
// Japan 7 Light Signal (Distance)
extern float block_state ();
extern float route_set ();
extern float next_sig_lr ();
extern float def_draw_state ();
extern float state;
extern float draw_state;
extern float enabled;
float next_state;
next_state=next_sig_lr (SIGFN_NORMAL);
if (next_state ==# SIGASP_STOP)
{
state =SIGASP_STOP;
}
else if (next_state ==# SIGASP_APPROACH_2 || next_state ==# SIGASP_APPROACH_3)
{
state = SIGASP_APPROACH_2;
}
else
{
state = SIGASP_CLEAR_2;
}
// Get draw state
draw_state = def_draw_state ( state );
// End of File
[...]
SignalType ( "JpDistance"
SignalFnType ( DISTANCE )
SignalLightTex ( "ltex" )
SignalLights ( 7
SignalLight ( 0 "White Light"
Position ( 0 0.33 0 )
Radius ( 0.055 )
)
SignalLight ( 1 "White Light"
Position ( 0 0.55 0 )
Radius ( 0.055 )
)
SignalLight ( 2 "White Light"
Position ( 0 0.11 0 )
Radius ( 0.055 )
)
SignalLight ( 3 "White Light"
Position ( 0.15 0.19 0 )
Radius ( 0.055 )
)
SignalLight ( 4 "White Light"
Position ( -0.15 0.47 0 )
Radius ( 0.055 )
)
SignalLight ( 5 "White Light"
Position ( 0.2 0.33 0 )
Radius ( 0.055 )
)
SignalLight ( 6 "White Light"
Position ( -0.2 0.33 0 )
Radius ( 0.055 )
)
)
SignalDrawStates ( 3
SignalDrawState ( 0 "StopD"
DrawLights ( 3
DrawLight ( 0 )
DrawLight ( 5 )
DrawLight ( 6 )
)
)
SignalDrawState ( 1 "ApproachD"
DrawLights ( 3
DrawLight ( 0 )
DrawLight ( 3 )
DrawLight ( 4 )
)
)
SignalDrawState ( 2 "ClearD"
DrawLights ( 3
DrawLight ( 0 )
DrawLight ( 1 )
DrawLight ( 2 )
)
)
)
SignalAspects ( 3
SignalAspect ( STOP "StopD" )
SignalAspect ( APPROACH_2 "ApproachD" )
SignalAspect ( CLEAR_2 "ClearD" )
)
)
[...]
SignalShape (
"JP1Signal6.s"
"Japan 7 Light Signal (Distance)"
SignalSubObjs ( 1
SignalSubObj ( 0
"HEAD1"
"Signal Head 1"
SigSubType ( SIGNAL_HEAD )
SigSubSType ( "JpDistance" )
)
)
)
[...]
Volver a Objetos para rutas MSTS
Usuarios navegando por este Foro: Bing [Bot] y 15 invitados