Forums

ForumsProgramming Forum

Rpg help

Thread Locked

Posted Jan 28, '08 at 7:22am

Huntragon

Huntragon

1 post

Im doing a mini rpg.But the script has a error.I want to do when the enemy has 1 or more health continue atacking and when has 0 or less go to the win screen.But when i atack him even if he has more life i go to the win screen.Who can help me?

 

Posted Feb 11, '08 at 8:45pm

Koshionos

Koshionos

376 posts

here try this

in your code to reduce his lives

if (opponent.lives < 0){
    _root.gotoAndstop("win screen");

} //end if

or

make it so after

if (opponent.lives < 0){
    you make the win screen appear on the same frame

 

Posted Feb 11, '08 at 9:04pm

firetail_madness

firetail_madness

19,843 posts

wow, so complicated!

 

Posted Feb 11, '08 at 10:32pm

royandgrand

royandgrand

254 posts

ummmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm......