-
I need this script that make a character die exactly when the health reaches 0 or anything lower then 0. The health is supposed to be a dynamic textbox. When it reaches zero the character dies. Does anyone have this script?
-
no one can help me
So out of the thousands of people in this forum there is no one that can help me with my problem not even the MadSci or Oolorin or someone like an administrator.
-
Hi, havocking
Are you familiar with “if” statements?
Well it would look something like this:
Code:
onClipEvent (enterFrame) {
if (health <= 0) {
this.state = “died”;
this.gotoAndPlay("kick_the_bucket");
}
}
I hope this helps, you can read up on "if" statements in your ActionScript Reference Guide on pages #17, #60
Happy Flashing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|