This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-01-08 00:39:30

RockmanZero12345566
Scratcher
Registered: 2011-10-29
Posts: 6

Enemy randomizer

I want to make an Turn-based RPG game, which I'm not quite sure if you can, as I am horrible at programming. Is there a way to randomize enemy attacks?

Offline

 

#2 2012-01-08 01:30:25

luiysia
Scratcher
Registered: 2011-07-05
Posts: 1000+

Re: Enemy randomizer

You could try making the enemy attack a variable (let's call it attack) and the guy's health a variable (let's call it "health"), and then whenever it attacks, have the bad guy

<change{ health }by( <pick random( lowest attack he can do )to( highest attack he can do)>

Make sure to make all the numbers negative or they'll add to his health instead.


http://i50.tinypic.com/dx00pd.gif

Offline

 

#3 2012-01-08 11:14:22

RockmanZero12345566
Scratcher
Registered: 2011-10-29
Posts: 6

Re: Enemy randomizer

Thank you  big_smile

Offline

 

Board footer