Discord
Login
Community
DARK THEME

title screen

screen how would I make my title screen come in and then fade out into something else?

you could have a variable that keeps track of how long the sprite has been on screen and then decrease the alpha/opacity of it as it fades to another screen behind it before stopping drawing it

init = function()
  title = 100
end

update = function()
 if title > 0 then
    title -= 1
  end
end

draw = function()
  if title > 0 then
    screen.setAlpha(title/100)
    screen.drawSprite("sprite_name",0,0,200,200
    screen.setAlpha(1)
  end
end

something along these lines

ACtts idk what's going on I just tried that but everytime I do it the code says there's an error idk if its just me or what but half the time I cant even write a code that works I'm 2 years in Java never once used animation in code just getting into it but yea

like is that a thing in the new update that is causing this

I made a game using Tiberius's template that changes the title screen into the game, here: https://microstudio.io/i/TiberiusC/spacebattle/

ok here's the thing Idk if that'll work because I'm trying to have it fade into a lil animation intro and then into the game

it's i just needa do this for the intro if you want an invite to help idm inviting

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community