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

#1 2010-07-05 18:54:16

Santar
Scratcher
Registered: 2010-07-01
Posts: 6

could somone help me out with my rpg pls

http://scratch.mit.edu/projects/Santar/1173197
ok well im not sure how to make it so it shows the costume once the guy has died u see because it picks a random between 1 and 30 the damage dealt somtimes goes over 0 and none of the scripts that are supposed to work at 0 work need some help pls and thank you

Offline

 

#2 2010-07-05 21:57:32

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

Re: could somone help me out with my rpg pls

Okay, so that script that says

Code:

If [enemylife] = [-]:
    Broadcast [Dead]
    Set [enemylife] to [0]
    Switch to costume [costume 6]
EndIf

All you have to do is change the if statement so it looks like this:

Code:

If [enemylife] < [1]:
    Broadcast [Dead]
    Set [enemylife] to [0]
    Switch to costume [costume 6]
    Stop Script
EndIf

That's it!  big_smile

Oh, and you should also put the "glide to..." and "Brodcast [hitback]" blocks after it checks if it's dead, since a dead enemy can't attack you.

Hope that helps you with your project! (It looks great so far)

Last edited by Harakou (2010-07-05 22:05:15)


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

Offline

 

Board footer