1. if cardinal == utility.north then sprite.playflipbook("#sprite", "player_dead_north", utility.reset_stage)
2. function utility.reset_stage(stage_id)
In the first line, I’m calling “sprite.play_flipbook()” and passing “utility.reset_stage()” as the complete function. This complete function requires an argument of “stage_id” so it can be generalized. How do I pass an argument through the “play_flipbook()” function?
Please don’t post screenshots of code. Post the code as text instead and either indent it with four spaces or select the text and press </> to format it as code.
All callback functions have self as first argument. Store the stage_id on self for easy access to the value in the callback.