Posting in here because this isn't something a lot of people can handle.
I'm trying to implement a damage system using a math equation (or expression, since I'm not trying to solve anything.) to try and recreate the systems used in normal RPG games. The equation is thus:
Damage= (((Attackstat * Attackpower/defensestat)/50)+2)*Random Number from 85-100/100
The problem I am having is getting a result from this equation and modifying a variable based on that result. I can't find any way to do this on my own, so my question is, is what I'm trying to possible in Scratch? I'm using version 1.4, apparently.
Last edited by RyuHimora (2009-09-27 01:41:51)
Offline
I may be completely wrong, but is what you are trying to do this:
Damage= (((Attackstat * Attackpower/defensestat)/50)+2)*Random Number from 85-100/100
Health = health - damage
?????
Offline
Ha HA! Fixed it by myself.
I was trying to do this:
[blocks]
<if>Damage= (((Attackstat * Attackpower/defensestat)/50)+2)*Random Number from 85-100/100
<end>
(but in the weird spikey hole thingy)
What I just figured out to do was this:
<change{ damage }by( (((Attackstat * Attackpower/defensestat)/50)+2)*Random Number from 85-100/100 )
It works perfectly. I hope this helps some other people.
Last edited by RyuHimora (2009-09-27 09:24:45)
Offline