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.

Adding chance on hit effects in RMXP

Hello.

So In my project I'm trying to have a sort of weapon proc system where depending on the powerup this character has, his basic attacks will have a chance to trigger additional attacks or effects.

This would be fine and dandy but using events I see no way to check if a character has used a basic attack.

How would you guys suggest I go about doing this? I understand a lot of Ruby and RGSS now, since I learned it over the past few days. So if scripting is necessary, I'll be welcome to that. Just not sure where to look in the scripts or what to do.
 
You could trying using the enchantment system on my blog maybe, the script locaitons for such things would be in Game_BattleAction and Scene_Battle, will have to work with the 2 of them, maybe a trigger of sorts. Set a random Chance
Code:
 

 

chance = rand(100)

if chance.between?(0, 50)

 

 select_action(@actor.weapon_id)

 

end

 

 

Or something similar, then set up the def for the action select the ability from a data array or data base. (doesnt have to be based on weapon just example)
 

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