RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Damage Sounds

Started by Arrow, January 24, 2007, 12:03:38 AM

0 Members and 1 Guest are viewing this topic.

Arrow

Question. How could I make it so a regular hit and a critical hit make different sounds?

Also, how could I make it play a different sound from the regular damage noise when a player is mortally wounded?

Arrow


Arrow

#2
PSI Bump!

QuoteQuestion. How could I make it so a regular hit and a critical hit make different sounds?

Also, how could I make it play a different sound from the regular damage noise when a player is mortally wounded?

In addition to that, how could I use different animations? Like, attacks would use "(reg/crit)hit" as the name of the animation depending on the situation.

Arrow

Bumpy roads in these parts.

Arrow

So bumpy in fact, that it's just plain  .

Dwarra?


Me™

#6
I don;t think it is that hard.. but could not solve this in one quick overlook.
ALL HAIL ME™

kathis

#7
I'll also take a look though chances of me finding it in the script will be not likly but I can still attempt


*after looking*

I am not sure what to change but I have a few guesses of where that would be located >.>

Game_Battler3
#--------------------------------------------------------------------------
  # ? ?????????
  #     attacker : ??? (????)
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
    # ?????????????
    self.critical = false
    # ??????
    hit_result = (rand(100) < attacker.hit)
    # ?????
    if hit_result == true
      # ?????????
      atk = [attacker.atk - self.pdef / 2, 0].max
      self.damage = atk * (20 + attacker.str) / 20
      # ????
      self.damage *= elements_correct(attacker.element_set)
      self.damage /= 100
      # ????????????
      if self.damage > 0
        # ????????
        if rand(100) < 4 * attacker.dex / self.agi
          self.damage *= 2
          self.critical = true
        end
        # ????
        if self.guarding?
          self.damage /= 2
        end
      end
      # ??
      if self.damage.abs > 0
        amp = [self.damage.abs * 15 / 100, 1].max
        self.damage += rand(amp+1) + rand(amp+1) - amp
      end
      # ??????
      eva = 8 * self.agi / attacker.dex + self.eva
      hit = self.damage < 0 ? 100 : 100 - eva
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
    end
    # ?????
    if hit_result == true
      # ????????
      remove_states_shock
      # HP ?????????
      self.hp -= self.damage
      # ??????
      @state_changed = false
      states_plus(attacker.plus_state_set)
      states_minus(attacker.minus_state_set)
    # ?????
    else
      # ????? "Miss" ???
      self.damage = "Miss"
      # ?????????????
      self.critical = false
    end
    # ??????
    return true
  end


Sprite_battler

if @battler.damage_pop
        damage(@battler.damage, @battler.critical)
        @battler.damage = nil
        @battler.critical = false
        @battler.damage_pop = false
      end


and It might be located in the following other skripts

Scean_battle 1
Scean_battle 2
Scean_battle 3
Scean_battle 4

there I looked and I tried >.> I hope this helps someone that knows more than I about skripts
Project
New project. The other dimention DND
RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html