Shiny Umbreon
Member
Hello. I want to ask for some help with this:
I have this as part of a battle formula I made, but the obvious thing is that enemies don't have a level. Now, I was thinking I could use something like "user.level = " and then put the enemy's ATK or a stat I'm not using in the case the formula was going to be applied for an enemy. The thing is I don't know how to make a condition like "Only if it's an enemy and not a player".
Or maybe, I can use that formula like "hit = skill.hit * user.atk * 50 / self.int". But I still need how I can restrict this so that it works only with enemies. It would be something like:
Please, I need help with this little thing. I don't know RGSS, but I am trying to do what I can, so I get stuck with these little things. Thank you in advance.
Code:
hit = skill.hit * user.level * 50 / self.int
I have this as part of a battle formula I made, but the obvious thing is that enemies don't have a level. Now, I was thinking I could use something like "user.level = " and then put the enemy's ATK or a stat I'm not using in the case the formula was going to be applied for an enemy. The thing is I don't know how to make a condition like "Only if it's an enemy and not a player".
Or maybe, I can use that formula like "hit = skill.hit * user.atk * 50 / self.int". But I still need how I can restrict this so that it works only with enemies. It would be something like:
Code:
if [condition]
hit = skill.hit * user.atk * 50 / self.int
else
hit = skill.hit * user.level * 50 / self.int
end
Please, I need help with this little thing. I don't know RGSS, but I am trying to do what I can, so I get stuck with these little things. Thank you in advance.