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

#1 2011-03-19 15:44:53

Ty_2f
Scratcher
Registered: 2010-10-14
Posts: 20

Pokemon Battle Engine

I am currently working on a Pokemon Battle Engine. I just need some MAJOR help. For instance, I need there to be damage to the Pokemon and keeping the battle paced is extremely hard post some helpful tips if you have any. PO


Why wait? With Scratch the possibilities are endless so get out there and SCRATCH!  smile

Offline

 

#2 2011-03-19 20:49:53

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Pokemon Battle Engine

The easiest way would be to have two sprites, one for each Pokemon. Then you could have them interact using broadcasts. Here is an example for pkmn 1's scripts:

Code:

When I receive p1's_turn
Set damage to (pick random min_damage to max_damage)
broadcast hitP2
broadcast p2's_turn

When I receive hitP1
change health by damage * -1

P2's scripts would mirror these appropriately. Of course, your scripts will likely be more complex depending on your needs, but hopefully this will get you started. Hope that helps!


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-03-21 20:28:02

Shin23
Scratcher
Registered: 2011-01-30
Posts: 100+

Re: Pokemon Battle Engine

If your playing as one of the pokemon fighing against another make say 4 different sprites that show then do
<when[ attack 1  ]clicked>
<broadcast[ Attack 1
<hide>

Then for the enemy
<when I receive[ Attack
<repeat( <pick random( 5  )to( 10
<change{ enemy health  }by( -2
<wait( 1 )secsc>
<broadcast[ Enemy attack

Then back to you
<when I receive[ Enemy attack
<repeat( <pick random( 5 )to( 10
<change{ your health }by( -2

Then for the attack boxes
<when I receive[ Enemy attack
<wait( 1 )secsc>
<show>

Fianaly, for both (using the health variables respectively)
<when green flag clicked>
<forever if><( <{ Health }> <<> 1 )>
<broadcast[ Dead
<hide>


http://scratch.mit.edu/static/projects/Shin23/1957329_med.png New Super Mario Bros. Scratch! (beta)
PSN: shauthegreat23

Offline

 

#4 2011-04-13 17:23:02

Ty_2f
Scratcher
Registered: 2010-10-14
Posts: 20

Re: Pokemon Battle Engine

Thanks for the help guys. I have damage and attacks. Any ideas for exp. points or *items?

*# of items and use

eg. http://scratch.mit.edu/forums/viewtopic.php?id=58988#req_messagehttp://scratch.mit.edu/forums/viewtopic.php?id=58988#req_message


Why wait? With Scratch the possibilities are endless so get out there and SCRATCH!  smile

Offline

 

#5 2011-04-14 08:00:18

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Pokemon Battle Engine

Download this and look at it:
http://scratch.mit.edu/projects/TheSaint/859522

Offline

 

#6 2011-04-16 05:55:18

jessica1234621
Scratcher
Registered: 2011-04-02
Posts: 1

Re: Pokemon Battle Engine

Ive made a Pokemon game. download it and have a look. it might help, it might not. good luck!   http://scratch.mit.edu/phttp://scratch.mit.edu/forums

Offline

 

Board footer