On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

animation sequence

A topic by nelliesnoodles created Sep 17, 2020 Views: 164
Viewing posts 1 to 2

Hello, I am really really new to Ruby.  

I'm trying to create an animation sequence, but drawing the sprite happens in a flash.  While trying to use the .elapsed? 360 on a tick_count to draw the image for 6 seconds, the image will not draw.   What am I missing?  

Code:

args.state.pauseRate ||= args.state.tick_count
    # find a way to pause for effective animation <--- While loops freeze up the game and/or won't draw ------->>>>>>>>>>>>
    while args.state.pauseRate.elapsed? 360
        args.outputs.sprites << [800, 301, 150, 150, 'sprites/explosion-6.png']
    end

Moderator moved this topic to General Development