Be a Supporter!

an easy question

  • 302 Views
  • 1 Reply
New Topic Respond to this Topic
Digita
Digita
  • Member since: Sep. 16, 2008
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
an easy question 2008-09-16 22:29:11 Reply

well i just joined newgrounds today and i have some actionscript knowledge but woefully incomplete. My question is, how do you make a random integer damage system (like the one in many rpgs) i know it may be simple to most but not to me >.>

Musician
Musician
  • Member since: May. 19, 2005
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to an easy question 2008-09-16 23:03:22 Reply

damageCaused = random(20)+50

That's how you would calculate the integer anyways. How you're going to apply the damage is more involved and depends on how you program your game.


I have no country to fight for; my country is the earth; I am a citizen of the world
-- Eugene Debs