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.

Help doing random damage through an event

Hi guys!

I'm going to be using Mr.Mo's SBABS, and most of my skills are going to be done through eventing, as there are special movements that I'm going to make the char. do... BUT! The problem is I'm horrible with variables and I don't know how I can do random damage for that skill BASED on the char. level.

If any of you guys out there could possible help me I'd be very grateful!
 
If it's an event, it's really pretty simple: Assign a variable equal to the character's level. Assign another one to a random number. Add, subtract, multiply, divide-- Control Variables can do all these. Combine them how you like.

And Deal Damage can Deal Damage equal to a variable. You're set-- everything you want is under Control Variable.
 
Unka Josh":2y8m319y said:
If it's an event, it's really pretty simple: Assign a variable equal to the character's level. Assign another one to a random number. Add, subtract, multiply, divide-- Control Variables can do all these. Combine them how you like.

And Deal Damage can Deal Damage equal to a variable. You're set-- everything you want is under Control Variable.

But then if I assign the variable equal to his level at... let's say 10, the same damage would be done at level 20, wouldn't it?
 
Hey, I'm not going to let you go away confused, here.

Let's try this: I don't know the SBABS, but I'll show you how to do it in the default battle system. Then, you adjust the commands to whatever the SBABS needs-- Show Animation for Battle Animation, Control Variables for Deal Damage, Script Calls, whatever.

Here's how it would look:

LevelLightning.png


Every time that you call the common event, it checks your current level, then multiplies that by a random number to determine how much damage is dealt.
 
Thanks dude, just tryed it out on the regular battle system, it works, but there are a couple of problems.

1: My first hits are always 0's, which is strange as in the variable control I stated I wanted a random number from
10 - 40...

2: After my guy uses the skill, I can't hit any other enemy other than the one he first hit. I don't want to use entire troop because it's for one enemy. Therefore, I am in quite a situation, :P

Edit: I hope I don't sound like I'm whining, if it offends you, sorry :P.
 
Unfortunately, that gets into how exactly you're coding events for skills in the battle system-- if you post a screenshot of your event code, I'd be happy to make a guess or two, but that's all that I can really do.
 

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