Here's what I want to do: in a battle situation, I want the "victim"'s icon to flash in different tones of a color for about a second and a half when that victim gets hit, and then to revert back to its original colors. How could I do that?
Been searching on the forums for that, but unfortunately, to no avail...
Thanks in advance
ID:173723
Nov 25 2003, 7:47 am (Edited on Nov 25 2003, 9:33 am)
|
|
In response to FranquiBoy
|
|
One way for you to potentially go about this would be to make a "flashing" alternative icon for your mobs, that is generated at runtime. Sure, its a bit hokey, but if you want the effect it would work. You'd have a flashingicon variable for your mobs, which would be assigned when a mob comes into existence by using an icon object of the mob's deafault icon in conjunction with icon procs. I'd recommend SetIntensity() for what you're trying to do. You could then make a flash() proc with a while loop to handle switching between the two states.
Just as a suggestion, you might consider flashing between the mob's icon and a generic "got hit" icon, like a starburst or something. It would accomplish about the same effect and would be much more practical resource-wise. You could also flash visibility, but that usually infers invulnerbility, then again, if you look at the orignal Super Mario Brothers... so does color cycling. I myself wouldn't use color changing for something used that frequently, though I am a huge fan of "Nothing quite says 'I'm poisoned' like turning someone bright green." |
RGB procedures modifys the icon by adding tones of color, but this makes a new icon everytime and creates alot of lag, the icon_state way, you make a clip style icon_state (the one that can move) to make the character flash and use the flick() procedure (look it up in dream maker if you dont know what it is)