Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: sickle on May 20, 2020, 08:11:20 AM
-
to my knowledge, the is no ttype for moving to the "Next display", so I came up with this little snippet of code that should have allowed me to trigger the next display after a video is done playing:
function code ()
{
local staticv = fe.add_image("ui/static.avi",0,0,1920,1080)
staticv.video_flags=Vid.NoLoop
if (staticv.video_time==staticv.video_duration)
{
fe.signal("next_display")
staticv.visible=false
}
}
according to the attract mode programming reference, video_time is the current point at which the video is at (in milliseconds), and video_duration is how long the video is in total (in milliseconds).
so why does this not work, and how could I fix it?
-
you can try to mod this i have used...
function hidenoextra( ttype, var, ttime )
{
function overview_exist(fullpathfilename)
{
try {file(fullpathfilename, "r" );return true;}catch(e){return false;}
}
local OVEX = overview_exist("../Attract/scraper/" + fe.game_info( Info.Emulator ) + "/overview/" + fe.game_info(Info.Name) + ".txt");
if ( ttype == Transition.StartLayout || ttype == Transition.FromOldSelection || ttype == Transition.ToNewList )
{
if (OVEX == false) sysview.bg_alpha = 0;
else sysview.bg_alpha = 190;
}
}
fe.add_transition_callback( "hidenoextra" );
-
http://forum.attractmode.org/index.php?topic=1518.0
maybe this cann help.