Jump to content

Recommended Posts

This script allows you to have characters on your map start flashing. You can choose how long the flash should be and the color of the flash, as well as the number of times it will flash.

If the character flashes more than once, then it will flash at a constant rate specified by the duration.

 

Note that if a character will flash endlessly, you must explicitly turn off the flash.

 

characterflash1.jpg

 

Here is an example of an endless flash at 120 frame intervals

 

characterflashani.gif

 

Download

 

Get it at Hime Works!

Edited by Tsukihime

Share this post


Link to post
Share on other sites

This is genius! A much better, cleaner way to mark NPC's that are important, compared to having an animation bubble above their head. Nice script Tsukihime!

Share this post


Link to post
Share on other sites

Can I use this script to make a character flash when that character's HP is low in an ABS? If so, how would I do this? If it helps I am using the Pearl ABS system.

You can use a parallel process common event that checks each actor's HP and then turn on the flashing using the appropriate script call, and turn it off when the HP is above a certain amount.

 

I would not recommend the event route.

Instead, I would modify the refresh method in Game_Actor to check HP and set the appropriate flash settings.

Share this post


Link to post
Share on other sites

Planning an AD&D style game, including removing the whole battle system to do roguelike / mmo style in-map-battles - and this is a good way to make things more obvious, including the regular poison damage etc :-)

Share this post


Link to post
Share on other sites

Can you explain how to do that please?

 

I would also like to do it for enemies.

I said Game_Actor above but it's actually the Game_Character classes, each of which is associated with a particular actor/event on the map.

 

 

class Game_Player
  
  alias :th_test_flash_update :update
  def update
    th_test_flash_update
    # less than 20%, start flashing red
    return unless actor
    if actor.hp < actor.mhp * 0.2
      @flash_on = true
      @flash_loop = 0
      @flash_duration = 60
      @flash_color = Color.new(255, 0, 0, 255)
    # less than 50%, start flashing white
    elsif actor.hp < actor.mhp * 0.5
      @flash_on = true
      @flash_loop = 0
      @flash_duration = 60
      @flash_color = Color.new(255, 255, 255, 255)
    # no flash
    else
      @flash_on = false
    end
  end
end

class Game_Follower
  
  alias :th_test_flash_update :update
  def update
    th_test_flash_update
    # less than 20%, start flashing red
    return unless actor
    if actor.hp < actor.mhp * 0.2
      @flash_on = true
      @flash_loop = 0
      @flash_duration = 60
      @flash_color = Color.new(255, 0, 0, 255)
    # less than 50%, start flashing white
    elsif actor.hp < actor.mhp * 0.5
      @flash_on = true
      @flash_loop = 0
      @flash_duration = 60
      @flash_color = Color.new(255, 255, 255, 255)
    # no flash
    else
      @flash_on = false
    end
  end
end

 

 

up to you to figure out how to do it for enemy characters.

post-6060-0-52605900-1379440500_thumb.jpg

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Would it be possible to make a solid color using this script?

 

Would be a great way to make silhouettes!

Share this post


Link to post
Share on other sites

That flashing color :)

 

Awesome script Tsukihime. That was what I wanted to learn how to do, how the color works instead of the hex. Cool. 

Share this post


Link to post
Share on other sites

I've tried setting it to really long durations (like, 5000), but it didn't seem to do anything, so flashing probably doesn't support it.

Ok. 

Thank you for looking into it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×