Results 1 to 2 of 2
  1. #1

    Action script 2 help

    Edit: I figured it out finally. I don't know if this topic can be deleted or not. Sorry.

    Hello. Wasn't sure if I was allowed to ask this here so I apologize in advance. It's in off topic so I assumed it may be alright. Sorry about the long message too, I'm trying to be as specific as I can.

    I've been messing with some action script in Flash Mx 2004 for about the past 3 or so hours and I can't quite get it to work the way I want it to. Really hoping someone could help me out here. Would really appreciate it.


    if (exp == 0) {
    hp -= 10;
    }else if(hp < 10) {
    gotoAndStop("no hp left",1);
    }else if(exp == 10) {
    hp -= 10;
    }else if(hp < 10) {
    gotoAndStop("no hp left",1);

    This actionscript is inside a "talk" button. From there are good or bad choices. Each time you click talk costs you "hp". A good choice gives you "10 exp". A bad choice gives you no exp. And the more exp the more different choices and conversations. But when you have no more "hp" you switch to a scene notifying you "No more hp".
    Now, as it is currently, when you have 10 exp the situation plays out perfectly. The Hp doesn't go into the negatives and when you click talk and you reach 0 Hp you are taken to the scene that says "No more Hp to talk". But this is the opposite for having only 0exp. The Hp goes into the negative and you never see the "No more Hp to talk." You just keep going further into negative Hp.

    I plan to add in later a variable for random messages but I need this to work first. And I don't understand why the same actionscript condition that's working for 10exp is not working for 0exp.

    Really sorry for posting this here, this script is old and when I tried searching on Google and Youtube, I couldn't find my answers or anyone with a similar question. Please let me know if I need to clarify anything.
    Last edited by Sakura; 19-May-17 at 10:07.
    - I'm a newb to Blender.
    - I have Photoshop. If you have an image that needs tweaking or something I can do to help feel free to ask. I'll see what I can do.

  2. #2
    BA Crew Fweeb's Avatar
    Join Date
    Sep 2003
    Atlanta, GA, USA
    Moved from "Misc: > Off-topic Chat" to "Support > Other Software"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts