In one of my favorite games exists this room. I’ve got the files from the original game, and I’m trying to use the sprites and everything just to recreate this room as sort of a test and to get a feel of the Gdev software.
In the room are a couple of pots, and a chest, some of which will give you a “rupee”
Here I have the background laid out, and I placed the green rupee object on the floor but I cannot get the shimmer effect to animate.
Here’s what I’ve got so far. Shouldn’t it be working on keypress?
Yes and no, is the current animation of the rupee the one you want to play?, more info is needed
Current animation sounded like the best option to pick, for now, I’m just trying to get my head around making this particular animation work on keypress, or as soon as the game finishes loading in the browser.
I’m also curious if I can control how many times the animation plays in succession before stopping
Check the number of the rupee animation that plays the special effect, and change to this animation when the key is pressed.
Yes, but with a variable, I will call it “times_played”, to test it you can use a scene variable, but if each rupee will have different animation timing you’ll have to set the variable as an object variable (each rupee will have the variable “times_played”).
You want to press a key → start playing the shimmer effect animation → play this animation X times → set the animation to the normal one, right?, something like this can make it:
[code]Conditions: Key Space is pressed
Actions: Do = “shimmer” to the current animation of rupee
Do = 0 to the variable “times_played”
Conditions: Animation of rupee is = “shimmer”
Animation of rupee has finished
Trigger once // not sure if Trigger once is needed
Actions: Do + 1 to the variable “times_played”
Conditions: Variable “times_played” is = 3 // play the animation 3 times
Actions: Do = “stand” to the animation of rupee[/code]
When you press Space, change the animation of the rupee to the bright one and reset the counter that tracks the number of times the animation has been played.
Then, while the shimmer animation is playing, each time it’s finished and reset, update the counter varible.
Finally, if the counter variable is greater than X (the animation has been played X times), set the animation to default.
I think ‘Play the current animation’ is for use if you have paused the animation. If you haven’t done that, then you probably want the ‘Change the animation’ action instead, as Lizard suggests.