Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved]Image flash before skill use

What I am aiming to do with the Sideview Battle System Tankentai XP is use the feature for the ability 'Cut-In', but have a screen flash as well as a sound effect play during it.

To help give an idea of what I mean, for those who have played the game Marvel vs. Capcom, when a character uses a special ability their picture flashes on the screen before/as they perform the attack.

(Here is a youtube video example of what I am aiming for http://www.youtube.com/watch?v=bAZObaYhw4w (At 11 seconds) )

A link to the script is here: viewtopic.php?f=11&t=60521

I have attempted doing this myself with common event calling from using a skill but the event is called AFTER the skill is used, not before.

I do hope that made sense, and I look forward to hearing from someone! Thank you for your time.

:smile:
 
In Scene_Battle (4), go to line 847
(where it says '@active_battler.consum_skill_cost(skill)')

And make a new line and put in 'white = Color.new(255,255,255)'.
That will make the flash color white.

And make another new line, and put in '$game_screen.start_flash(white, 15)'.
That will make the screen flash white for 15 frames (1/2 or so of a second).
 
Near":1ue3pptu said:
In Scene_Battle (4), go to line 847
(where it says '@active_battler.consum_skill_cost(skill)')

And make a new line and put in 'white = Color.new(255,255,255)'.
That will make the flash color white.

And make another new line, and put in '$game_screen.start_flash(white, 15)'.
That will make the screen flash white for 15 frames (1/2 or so of a second).

I thank you for the assistance!

Though I seem to of come across a new rather silly problem.. I do not have a line 847 in Scene_Battle 4! :blank:

As it stands currently, I only have 453 lines within that area and ctrl+f'ing "@active_battler.consum_skill_cost" is producing no results. :sad:

Might I be missing something and the answer be flying over my head?

Again, thank you very much for the help!
 
This works perfectly! :biggrin:

But I'd like to ask one more quick question though, would it be possible to make it so this only works for certain skills and not every skill?

If it does every skill, it might give someone a seizure now!

Thanks a bunch good sir!

:thumb:
 
Yeah, here try this:

[rgss] 
# paste above the Sideview 1 script
module RPG
  class Skill
    def flash?
      case @name
      when "Skill Sword"
        return true
    # when "skill name"
    #   return <true or false>
      else
        return false
      end
    end
  end
end
 
[/rgss]

and then where it says:

'color = Color.new(255,255,255)
$game_screen.start_flash(color, 15)'

change it to:

if skill.flash?
color = Color.new(255,255,255)
$game_screen.start_flash(color, 15)
end

--

And this works with the name of the skill, so you don't have to worry
about it's number in the database.

And if you apply this logic, you might be able to figure out how to play
sound effects, but I can't tell you how until you're really stumped.
 
Near":33b6oyjq said:
Yeah, here try this:

[rgss] 
# paste above the Sideview 1 script
module RPG
  class Skill
    def flash?
      case @name
      when "Skill Sword"
        return true
    # when "skill name"
    #   return <true or false>
      else
        return false
      end
    end
  end
end
 
[/rgss]

and then where it says:

'color = Color.new(255,255,255)
$game_screen.start_flash(color, 15)'

change it to:

if skill.flash?
color = Color.new(255,255,255)
$game_screen.start_flash(color, 15)
end

--

And this works with the name of the skill, so you don't have to worry
about it's number in the database.

And if you apply this logic, you might be able to figure out how to play
sound effects, but I can't tell you how until you're really stumped.

Works perfectly once more! Thanks a ton good sir!

And if I am not mistaken, for it to play a sound effect all I must do is add that line of script with the code that was placed within the Sideview 2 '@active_battler.consum_skill_cost(skill)' correct?

Now all I need to learn is what the code is to initiate a sound effect!

Again, many thanks. :smile:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top