I have a node which is just a black rectangle with the same size as the screen.
The purpose of above node is to make screen transitions(fade to black/fade from black).
I can’t seem to change the alpha of the above node, console spits out the below error:
function init(self)
-- Add initialization code here
-- Remove this function if not needed
msg.post(".", "acquire_input_focus")
go.set("#FAS-Statue", "scale.x", 0.65)
go.set("#FAS-Statue", "scale.y", 0.65)
gui.set_color( "#ScreenFadeNode", vmath.vector4(1, 1, 1, .5) )
-- ^-- ERROR:bad argument #1 to 'set_color' (userdata expected, got string)
-- go.set_position( vmath.vector3( 0, 0, 0 ), "#FAS-Website" )
-- go.set_position( vmath.vector3( 0, 0, 3 ), "#ScreenFade" )
-- go.set( "#ScreenFade", "tint", vmath.vector4( 1, 0, 0, .5) )
end
You can change the renderscript to draw the sprite on top of everything else. You need to change material tag though. This is a bit advanced. Perhaps use labels instead of text nodes?
Thanks, I have fade to black and fade from black screen transitions working now…
…Next is switching screens which is covered in the “Color Slide” tutorial…