Post #1 · Publicado en 2017-08-10 04:46:31pm Hace 7.7 años
![]() | |
---|---|
![]() |
Member |
142 Mensajes | |
Not Set | |
Reg. 2015-01-13 | |
"But enough talk! Have at you!" |
I'm trying to use lua in #BGCHANGES inside a simfile and quad coloring isn't working for some reason. It just shows a white Quad no matter what.
Inside my .ssc file:
#BGCHANGES:0.000=background=1.000=0=0=1=====,
;
inside background/default.lua:
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(setsize,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Red");fadebottom,1);
--OnCommand=cmd(Center);
};
Def.Quad{
InitCommand=cmd(setsize,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("#ff3300"););
--OnCommand=cmd(Center);
};
--FG/BG lua gets unloaded when there's nothing to process.
Def.Quad{
OnCommand=cmd(sleep,999);
};
};
Inside my .ssc file:
#BGCHANGES:0.000=background=1.000=0=0=1=====,
;
inside background/default.lua:
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(setsize,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Red");fadebottom,1);
--OnCommand=cmd(Center);
};
Def.Quad{
InitCommand=cmd(setsize,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color("#ff3300"););
--OnCommand=cmd(Center);
};
--FG/BG lua gets unloaded when there's nothing to process.
Def.Quad{
OnCommand=cmd(sleep,999);
};
};
Post #2 · Publicado en 2017-08-10 07:38:04pm Hace 7.7 años
It is "best practice" not to rely on an actor's InitCommand if that actor was loaded from a BGCHANGE. This due to the way the engine handles BGCHANGES; it basically ends up resetting and thus ignoring most (all?) attributes set within an InitCommand. My understanding of this is fuzzy at best.
Also, your third "keep-alive" Quad is not needed for BGCHANGES, only FGCHANGES.
Also, your third "keep-alive" Quad is not needed for BGCHANGES, only FGCHANGES.