Score: 9
"Pretty Good"
date: October 8, 2008
Sorry about my jackass comment on the beginner's tutorial... I was a noob then. However, it looks like today the student will be teaching the master. Before even testing your script, I noticed an error!
onClipEvent(enterFrame){//Okay, no flaws here.
if(_root.hp<99){//Shouldn't it be 100? But that's personal preference.
if(this.hitTest(_root.potionholder)){
//Impossible! if( conditions can't be inside of other if( conditions, unless you're using a different version of AS. The real script should be in one if( condition that contains &&.
_root.potionholder.gotoAndStop(2);//T his would be much easier if it were a simple unloadMovie();
_root.hp+=10;//Isn't that a little stingy? Once again, personal preference
//BUT YOU FORGOT TO TERMINATE THE FUNCTIONS WITH A }}!!!
Also, here's a better wall script (it's not mine, but it works much better)
onClipEvent(load){
radius = _width/2 - 1;
}
onClipEvent(enterFrame){
while(_root.walls.hitTest(_x, _y+radius, true)){
_y--;
}
while(_root.walls.hitTest(_x, _y-radius, true)){
_y++;
}
while(_root.walls.hitTest(_x-radius, _y, true)){
_x++;
}
while(_root.walls.hitTest(_x+radius, _y, true)){
_x--;
}
}
Although the script doesn't seem too bad. I should be able to comprehend it if I really try.
Also, you never put in script for the player to stop moving its feet, or diagonal walking, which (I think) would just be if(! conditions, the ! meaning if it is NOT, or perhaps }else{ actions... I never went into that kind of stuff.
However, I did like how you said how you could keep the HP from going over 100, but I personally would have put:
onClipEvent(enterFrame){
if(_root.hp>100){
_root.hp=100;
}
}
I liked the numeric stepper though, although I could only partially understand it.
Penultimately, there's a glitch where the bounce stops working and you can get infinitely low health this way.
And finally, you did a good job, but show how to make a shop, because although I have some ideas on how you would buy stuff, and only stuff you could afford, I only have about 1/3 of an idea how to make the items you bought count. And even if I know, other people don't.
The only thing you have ensured is that I will know how to make it so that you have to pay to advance a level or area.
November 3, 2008
Author's Response:
Thanks for whatever the heck you tried to tell me, I appreciate any help. But seriously, I'm confused why some of this wouldn't work for you when it worked for everyone else?