Possible to tin an event?

S_Rank_Crazy

Veteran
Veteran
Joined
Dec 30, 2015
Messages
78
Reaction score
47
First Language
English
Primarily Uses
RMMV
I had a cool idea to be able to highlight objects (events) in an environment but I had a look through the event commands, did a little bit of googling and hit a bit of a dead end. So. Basically, what I'm looking for is a way to apply a tint to the event sprite which fades over a set period of time. From the looks of it there's no way to do this via the standard event commands, right? Or have I missed something?


Alternately I though of maybe taking a code approach, but I suspect it's not as easy as doing:


event._image.tint(myColour);


Or simply doing an adjustment on the colour matrix (since I'll need to ensure I get back to my initial state). I'm thinking the path of least resistance is to copy the canvas' sprite in to a secondary Bitmap and add to the event container, then set all non-alpha pixels to my desired colour, then over time just adjust the alpha of the entire bitmap. When alpha === 0 then remove the 'tint' image. Open to suggestions though. Doesn't seem like the most performant of solutions though.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV
Probably the easiest way would be to create a character graphic of the item. In the graphic you can have the different frames tinted differently so that when you play a stepping animation it will change tint.


If you're not sure how to do this, I'd be glad to elaborate.
 

Vox Novus

Knight of Whispers
Veteran
Joined
Mar 18, 2013
Messages
3,293
Reaction score
2,473
First Language
English
Primarily Uses
N/A
Alternative suggestion: You could play an animation on the event that has a tint to the target for a number of frames.
 

S_Rank_Crazy

Veteran
Veteran
Joined
Dec 30, 2015
Messages
78
Reaction score
47
First Language
English
Primarily Uses
RMMV
Alternative suggestion: You could play an animation on the event that has a tint to the target for a number of frames.
ooh. Hadn't thought of that. I'll give it a go. Might look at how MV handles in in the code and maybe make a plugin for it to be able to highlight things dynamically based on some event-define parameters. thanks guys. I'll let you know how if I run in to any issues :)
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
If you are alright using a plugin, you can grab Character Control from my plugin thread. Character Control will allow you to alter all kinds of character sprite attributes.


 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
I had a cool idea to be able to highlight objects (events) in an environment but I had a look through the event commands, did a little bit of googling and hit a bit of a dead end. So. Basically, what I'm looking for is a way to apply a tint to the event sprite which fades over a set period of time. From the looks of it there's no way to do this via the standard event commands, right? Or have I missed something?


Alternately I though of maybe taking a code approach, but I suspect it's not as easy as doing:



event._image.tint(myColour);


Or simply doing an adjustment on the colour matrix (since I'll need to ensure I get back to my initial state). I'm thinking the path of least resistance is to copy the canvas' sprite in to a secondary Bitmap and add to the event container, then set all non-alpha pixels to my desired colour, then over time just adjust the alpha of the entire bitmap. When alpha === 0 then remove the 'tint' image. Open to suggestions though. Doesn't seem like the most performant of solutions though.


Hey it's a good idea, and I thought something.


here step is working i test it.


1: create animation in database


2: make flash the (target) in the animation editor, ex: flash target for 5 sec (255 255 255 255) for white


3: call the animation on specific event.


For event:


$gameMap.event(ID).requestAnimation(id);


ex: for play animation 9 on event 16. 


$gameMap.event(16).requestAnimation(9);


Is work and give good resulte to make example item on map Flashing.
 

S_Rank_Crazy

Veteran
Veteran
Joined
Dec 30, 2015
Messages
78
Reaction score
47
First Language
English
Primarily Uses
RMMV
Thanks for the help guys. @Exhydra that plugin looks amazing but I couldn't think of a good way to handle cases with event pages changing affecting the highlighting mechanism whilst still on the map. I started looking at the animation code for setting the tones and how that works and I came up with this:
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
@S_Rank_Crazy I am getting a message that says I do not have permission to show the content you posted.   o:
 

S_Rank_Crazy

Veteran
Veteran
Joined
Dec 30, 2015
Messages
78
Reaction score
47
First Language
English
Primarily Uses
RMMV
Dammit, pending approval. That's what I get for being enthusiastic.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top