Logo

Quad coloring not working inside #BGCHANGES lua

Register Log In Back To Forums

Post #1 · Posted at 2017-08-10 04:46:31pm 6.7 years ago

Offline ZTS
ZTS Avatar Member
139 Posts
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);

};
};
Get Rave It Out! https://sites.google.com/view/riodevs/home
Want your theme made? I take commissions, PM for details.

Post #2 · Posted at 2017-08-10 07:38:04pm 6.7 years ago

Offline dbk2
dbk2 Avatar Member
332 Posts
Not Set
Reg. 2012-04-30


Last updated: 2017-08-10 07:41pm
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.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 8% · Database: 4% · Server Time: 2024-04-26 23:20:57
This page took 0.004 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language