A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: RPG Health Text ?

  1. #1
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976

    RPG Health Text ?

    I just quickly whiped up an example to help me explain my question.

    This is totally coded wrong but its the effect i want

    What i want to know is how do you make the wave effect to text when health has been taken off.

    Heres an example.

    Press Space to remove health. I do realise that if you hold down SPACE the numbers continue to change but it was a 1 min job just to show as an example

    Click Here

    So what i want is when the character gets hit , the script to generate a numbe and place the number in the wave.

  2. #2
    Senior Member mbenney's Avatar
    Join Date
    Mar 2001
    Posts
    2,744
    what you got there seems pretty cool as it is, post the fla and i can make some alterations
    [m]

  3. #3
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    It is seriously coded basic. Its more movieclip then action script.

    It was just an example but ill post the fla if you really want me too...

  4. #4
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    You see what it does right know is when i press space it choose's 3 random numbers between 0 and 9. Example number1 = 9 number2 = 5 number3 = 0 and it places each individual number in a text box. Labeled Hundreds Tens Ones and the textboxes are animated to give the wave effect.

    so the numbers are totally random. But what i want is when you press space the health to be taken off is to be calculated correctly depending on a number of things, level of character the strength of character and so on.

    So just say the Level of the character is 10 and the strength is 4.

    Level = 10;
    Strength = 4;

    minusHealth = (level * stregnth)* random(5)+1;

    Just say the computer chooses 5 for a random number. The health to be taken off will equal 200.

    So 200 will be taken off. But thats not the problem the problem is breaking up the whole number into hundreds tens and ones.

    eg
    Hundreds = 2;
    Tens = 0;
    Ones = 0;

    Ow and another thing just say 10 is the final number of health which the equation works out.

    Hundreds = 0;
    Tens = 1;
    Ones = 0;

    How do i make the hundreds colum blank ? instead of placing zero in the Hundreds colum.

    Would i check to see wether the number chosen is less then 100?

    Does anyone know how i can do this. Its probally really simple im just being really lazy atm.
    Last edited by hooligan2001; 03-05-2003 at 11:27 PM.

  5. #5
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    hey there,knocked upa little example for you,check it out here:
    http://www.geocities.com/ugur112/score.zip

    you just have to type in a max 3 character long thingy..

  6. #6

  7. #7
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Thanks heaps tom its exactly what i wanted Thnx to u too mbenney

  8. #8
    Yes we can tomsamson's Avatar
    Join Date
    Sep 2001
    Location
    Team Titan Secret Lair
    Posts
    4,666
    Originally posted by mbenney
    that hoe tom beat me to it


    Originally posted by hooligan2001
    Thanks heaps tom its exactly what i wanted Thnx to u too mbenney
    no prob,can i see the new version?
    i like that wave effect

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center