Hi I work on something and I wanted to know how I could do make my sprite flashing but only after a certain frame
I wanted to make something like that
1 "id" ("red","blue","Green"),"opacity","Frequency":flashing => [(R,B,G),O,F],obviously you know for the rest but frequency is a value more high is the value and more it will take time for the sprite to flash
also I wanted to know the method for doing this I will be really thanksful for the help!
Iv'e always used another page in an event, Self switch A on and off with the wait command inbetween, and different sprites on both of the pages
I am sorry this for a script who change a scene this not for a map use so using a event is a big no
You will certainly need to make an update method for your sprite.
I am not home right now so I can't give the exact steps, but you should do something like this:
def update super #or the alias update_sprite_flashenddef update_sprite_flash if @toggle == false @sprite.opacity += module::blink_speed @toggle = true if @sprite.opacity > module:😮pacity_max else @sprite.opacity -= module::blink_speed @toggle = false if @sprite.opacity < module:😮pacity_min endendI am writing this from my memory, so it might not work flawlessly without editing some things.A thing to note that you must initialize '@toggle' in the scene as either false or true.
Every 'module::thing' is defined in a module or you can hard-code it if you want.
This method will control the speed of the flashing only. You will need to add the colors yourself somehow.
I haven't done anything like that, so can't help with it.
But I see that Tsuki used a method called 'flash(color,duration)', so using that may be an easy solution.
I might change my cursor blinking using that method too. 😀
Changing the tone manually would also work. You can look at the Game_Screen to see how it does it.
I use that concept in this video
I don't know how it compares to simply using flash. Sprites support both tone and flash, but from the docs it looks like they do the same thing, except one takes precedence over the other.
sorry for not answering I was sick I will try your methods guys and see wich one work well!