Creating Fake Meter Gain W/ Scripted Life and MP Bars for Grabbing Items (HP and MP; Using Non-Animation Script)

maxman

Well-known member
I'm trying to create a script for making a fake gain every time both HP and MP bars increase to the end, but not with mp 100 literally. I know about using changeentityproperty(entity, "mp", 100), and it's quite simple only if you're not using any specific thing with/for a script. However, that only increases straight forward and skips to just exactly what it says even there is a specified script especially being used in update(d).c or ondrawscript, or didhitscript for items. You can check with the latest version of Fight Forever to see what I mean.

I already had drawn my scripted bars of both HP and MP on screen for a player template, as well as for an enemy template. But the problem is that if any player or enemy has their own lifebar reduce with their default lifebars, the scripted lifebar, along with MP bar, doesn't reduce like the default ones do. When I try to pick an item that either gives health or MP, the scripted lifebar doesn't gain at all. I don't want to change an entity property for literally gaining amount by skipping to a certain number. What I want is to gain a scripted bar slightly like you're looking at the default lifebar moving smoothly, but it's got to be a fake gain with a slight gain.


 
To explain this better which I should've done it earlier, I'm trying to make the enemy's HUD sprite show (both icon and hud sprites are separated) like you see in @Kratus's Streets of Rage 2X. It looks like that I have to use takedamagescript for the enemy's hud sprite to show every time the enemy takes damage, but I don't know which part of the function that does it. Not only that, but I'm also trying to make the enemy's lifebar (drawbox) to reduce from the opposite side. I tried to do the same way I did with my Street Fighter project, but I can't get the same result for reducing the lifebar like I did before. Here's the enemy's ondraw script which I attempted to make exactly like I did in my SF project but still don't get the good result. It just stays there without getting reduced. When I use drawsprite for the enemy, it only exists when the enemy exists until it dies.

enemy_ondraw.c:
C:
void main(){
    void self = getlocalvar("self");
    int P1 = getplayerproperty(0, "entity");
    int P2 = getplayerproperty(1, "entity");
    int P3 = getplayerproperty(2, "entity");
    int P4 = getplayerproperty(3, "entity");
    void mStyle = getglobalvar("musicStyle");
    void barEnemyG = getglobalvar("barEnemyG");
    void barEnemyR = getglobalvar("barEnemyR");
    void barEnemyB = getglobalvar("barEnemyB");
    int HP = getentityproperty(self, "health");
    int maxHP = getentityproperty(self, "maxhealth");
    int Health = 59*HP/maxHP;
    int xSize = 544;
    int ySize = 6;
    int xPos = 113; // BASE X POSITION
    int yPos = 251;

    int Green = rgbcolor(58, 184, 27);
    int Red = rgbcolor(147, 32, 19);
    int Blue = rgbcolor(31, 86, 214);

    if(!barEnemyG){
        barEnemyG = loadsprite("data/sprites/barEnemyG.png");
    }

    if(!barEnemyB){
        barEnemyB = loadsprite("data/sprites/barEnemyB.png");
    }

    if(!barEnemyR){
        barEnemyR = loadsprite("data/sprites/barEnemyR.png");
    }

    if(getentityvar(self, "enemigo") == NULL()){
        setentityvar(self, "enemigo", Health);
    }

    if(findtarget(P1) != NULL()){
        if(mStyle == 0){
            //drawsprite(barEnemyG, 25, 44, 8000);
            drawbox((150-getentityvar(self, "enemigo")), 111, getentityvar(self, "enemigo"), 1, 8000, Green, 0);
            drawbox((149-getentityvar(self, "enemigo")), 112, getentityvar(self, "enemigo"), 1, 8000, Green, 0);
        }else if(mStyle == 1){
            drawsprite(barEnemyR, 25, 44, 8000);
            drawbox((150-getentityvar(self, "enemigo")), 111, getentityvar(self, "enemigo"), 1, 8000, Red, 0);
            drawbox((149-getentityvar(self, "enemigo")), 112, getentityvar(self, "enemigo"), 1, 8000, Red, 0);

        }else if(mStyle == 2){
            drawsprite(barEnemyB, 25, 44, 8000);
            drawbox((150-getentityvar(self, "enemigo")), 111, getentityvar(self, "enemigo"), 1, 8000, Blue, 0);
            drawbox((149-getentityvar(self, "enemigo")), 112, getentityvar(self, "enemigo"), 1, 8000, Blue, 0);
        }
    }

    if(Health < getentityvar(self, "enemigo")){
        if(getentityvar(P1, 1) == NULL()){
            setentityvar(P1, 1, 0);
        }
        setentityvar(P1, 1, getentityvar(P1, 1)+1);
        if(getentityvar(P1, 1) > 3){
            setentityvar(P1, "enemigo", getentityvar(P1, "enemigo")-1);
            setentityvar(P1, 1, 0);
        }
    }

}

void oncreate(){
    void barEnemyG;
    void barEnemyR;
    void barEnemyB;

    if(!barEnemyG){
        barEnemyG = loadsprite("data/sprites/barEnemyG.png");
        setglobalvar("barEnemyG", barEnemyG);
    }

    if(!barEnemyB){
        barEnemyG = loadsprite("data/sprites/barEnemyB.png");
        setglobalvar("barEnemyB", barEnemyB);
    }

    if(!barEnemyR){
        barEnemyR = loadsprite("data/sprites/barEnemyR.png");
        setglobalvar("barEnemyR", barEnemyR);
    }

}

void ondestroy(){
    void barEnemyG;
    void barEnemyR;
    void barEnemyB;

    if(barEnemyG){
        free(barEnemyG);
        setglobalvar("barEnemyG", NULL());
    }

    if(barEnemyR){
        free(barEnemyR);
        setglobalvar("barEnemyR", NULL());
    }

    if(barEnemyB){
        free(barEnemyB);
        setglobalvar("barEnemyB", NULL());
    }

}

Note: The dark green bar is a lifebar while the bright green bar is player's MP. The life and MP bars on the left side are players. The dark green bar below the player 1's is the enemy's lifebar.

The enemy takes damage, but its green bar doesn't reduce at all.

Whether player 1 takes damage or picks up items with health, its lifebar neither increases nor decreases right after picking up items with health points. For instance, player 1 takes damage first with 20 points subtracted out of 100 from its lifebar. When you get food with 15 points of health, it reaches to 95/100, but its lifebar retains from gaining health points. What I wanna do with both MP and HP bars is that I want to make it to look curved, and this is why I put 2 drawbox lines in it for a curved bar. Reducing MP is okay in using special, but still the same problem with not actively gaining smoothly since I want to use curved bars.

This is part of player's script in updated.c for the lifebar, as well as its hud sprite (drawsprite).

Part of updated.c for players:
C:
void playerBars(){
    if(openborvariant("in_level") == 1){
        int P1 = getplayerproperty(0, "entity");
        int P2 = getplayerproperty(1, "entity");
        int P3 = getplayerproperty(2, "entity");
        int P4 = getplayerproperty(3, "entity");

        int HP1; int HP2; int HP3; int HP4;
        int MaxHP1; int MaxHP2; int MaxHP3; int MaxHP4;
        int Health1; int Health2; int Health3; int Health4;
        int MP1; int MP2; int MP3; int MP4;
        int MaxMP1; int MaxMP2; int MaxMP3; int MaxMP4;
        int mainMP1; int mainMP2; int mainMP3; int mainMP4;

        int HP1 = getentityproperty(P1, "health");
        int HP2 = getentityproperty(P2, "health");
        int HP3 = getentityproperty(P3, "health");
        int HP4 = getentityproperty(P4, "health");

        int MaxHP1 = getentityproperty(P1, "maxhealth");
        int MaxHP2 = getentityproperty(P2, "maxhealth");
        int MaxHP3 = getentityproperty(P3, "maxhealth");
        int MaxHP4 = getentityproperty(P4, "maxhealth");

        int MP1 = getentityproperty(P1, "mp");
        int MP2 = getentityproperty(P2, "mp");
        int MP3 = getentityproperty(P3, "mp");
        int MP4 = getentityproperty(P4, "mp");

        int MaxMP1 = getentityproperty(P1, "maxmp");
        int MaxMP2 = getentityproperty(P2, "maxmp");
        int MaxMP3 = getentityproperty(P3, "maxmp");
        int MaxMP4 = getentityproperty(P4, "maxmp");

        void BarG = getglobalvar("BarG"); // For green music
        void BarB = getglobalvar("BarB"); // " blue "
        void BarR = getglobalvar("BarR"); // " red "

        void mStyle = getglobalvar("musicStyle");

        int GreenH = rgbcolor(58, 184, 27);
        int GreenM = rgbcolor(83, 224, 48);

        int RedH = rgbcolor(147, 32, 19);
        int RedM = rgbcolor(247, 27, 21);

        int BlueH = rgbcolor(31, 86, 214);
        int BlueM = rgbcolor(99, 204, 254);

        void win = getglobalvar("win");

        if(!win){
            win = loadsprite("data/sprites/win.png");
            setglobalvar("win", win);
        }

        if(!BarG){
            BarG = loadsprite("data/sprites/barPlayerG.png");
            setglobalvar("BarG", BarG);
        }

        if(!BarR){
            BarR = loadsprite("data/sprites/barPlayerR.png");
            setglobalvar("BarR", BarR);
        }

        if(!BarB){
            BarB = loadsprite("data/sprites/barPlayerB.png");
            setglobalvar("BarB", BarB);
        }

        if(P1){
            HP1 = getentityproperty(P1, "health");
            MaxHP1 = getentityproperty(P1, "maxhealth");
            Health1 = 59*HP1/MaxHP1;
            MP1 = getentityproperty(P1, "mp");
            MaxMP1 = getentityproperty(P1, "maxmp");
            mainMP1 = 59*MP1/MaxMP1;

            if(MP1 == MaxMP1){
                drawsprite(win, 110, 27, 5000);
            }if(MP1 < MaxMP1){
                setglobalvar("win", NULL());
            }

            if(getentityvar(P1, "playerOne") == NULL()){setentityvar(P1, "playerOne", Health1);}
            if(getentityvar(P1, "OneMP") == NULL()){setentityvar(P1, "OneMP", mainMP1);}

            if(Health1 < getentityvar(P1, "playerOne")){
                if(getentityvar(P1, 1) == NULL()){
                    setentityvar(P1, 1, 0);
                }
                setentityvar(P1, 1, getentityvar(P1, 1)+1);
                if(getentityvar(P1, 1) > 3){
                    setentityvar(P1, "playerOne", getentityvar(P1, "playerOne")-1);
                    setentityvar(P1, 1, 0);
                }
            }

            if(mainMP1 < getentityvar(P1, "OneMP")){
                if(getentityvar(P1, 1) == NULL()){
                    setentityvar(P1, 1, 0);
                }
                setentityvar(P1, 1, getentityvar(P1, 1)+1);
                if(getentityvar(P1, 1) > 3){
                    setentityvar(P1, "OneMP", getentityvar(P1, "OneMP")-1);
                    setentityvar(P1, 1, 0);
                }
            }

            if(mStyle == 0){
                drawbox(33, 80, getentityvar(P1, "playerOne"), 1, 1600, GreenH, 0); // x - 33; y - 17
                drawbox(32, 81, getentityvar(P1, "playerOne"), 1, 1600, GreenH, 0); // x- 32; y - 18
                drawbox(31, 82, getentityvar(P1, "playerOne"), 1, 1600, GreenH, 0); // x - 31; y - 19
                drawsprite(BarG, 0, 2, 1000); // x - -1; y - 2

                drawbox(27, 86, getentityvar(P1, "OneMP"), 1, 1600, GreenM, 0); // x - 27; y - 23
                drawbox(26, 87, getentityvar(P1, "OneMP"), 1, 1600, GreenM, 0); // x - 28; y - 24

            }else if(mStyle == 1){
                drawbox(33, 17, getentityvar(P1, "playerOne"), 1, 1600, RedH, 0);
                drawbox(32, 18, getentityvar(P1, "playerOne"), 1, 1600, RedH, 0);
                drawbox(31, 19, getentityvar(P1, "playerOne"), 1, 1600, RedH, 0);
                drawsprite(BarR, 0, 2, 1000);

                drawbox(27, 23, getentityvar(P1, "OneMP"), 1, 1600, RedM, 0);
                drawbox(26, 24, getentityvar(P1, "OneMP"), 1, 1600, RedM, 0);

            }else if(mStyle == 2){
                drawbox(33, 17, getentityvar(P1, "playerOne"), 1, 1600, BlueH, 0);
                drawbox(32, 18, getentityvar(P1, "playerOne"), 1, 1600, BlueH, 0);
                drawbox(31, 19, getentityvar(P1, "playerOne"), 1, 1600, BlueH, 0);
                drawsprite(BarB, 0, 2, 1000);

                drawbox(27, 23, getentityvar(P1, "OneMP"), 1, 1600, BlueM, 0);
                drawbox(26, 24, getentityvar(P1, "OneMP"), 1, 1600, BlueM, 0);

            }
        } // PLAYER 1
    }
}

When I let the enemy hit player first and the player's lifebar reduces, there's no problem. But when the player attacks the first, the enemy's lifebar doesn't reduce at all. Sometimes, when the player takes damage from the enemy, its lifebar doesn't reduce. (Though I pick up a health-provided item, the player's scripted drawn lifebar (dark green) doesn't gain at all.) When player's MP is completely zero, you don't see an MP bar (light green) at all. Even when you hit an enemy, it also doesn't MP at all.

Recently, I provided MP icon sprites (2 colored boxes) for gaining player 1's MP, as well as changing player 1's MP to 0 in level.c, so it would begin with 0 MP every time any level begins. I added the enemy's icon and placed the enemy's curved lifebar to its HUD now. I want the enemy's HUD not to show until the enemy takes damage like you see in SOR2X.

Here are player 1's MP icons. But the win sprite is used when the MP is full in updated.c.

Code:
iconmplow data/chars/heroes/Terry/point0.png #No boxes
iconmphalf data/chars/heroes/Terry/point1.png #Black box
iconmphigh data/chars/heroes/Terry/point2.png #Black and white boxes

I'm doing this the way the MP bar acts with diamonds showing in Fight Forever by @Mr.Q!. However, every time I pick up an item with full MP or higher, the win sprite shows first before the two boxes. That's because it literally gets to a specified number point. Is there a way to fake MP and HP gains with slight increase motionally instead of literally skipping to an exact point. I need an entity that can do a fake gain by still gaining the player's MP slightly until it reaches full.

Code:
name soda2
type item
mp 125 #Skip to a number point of MP value

anim idle

    offset 7 20
    delay 80
    bbox 0 0 15 22
    loop 1
    frame data/chars/misc/items/soda2.png
    delay 3
    drawmethod tintmode 1
    drawmethod tintcolor 255_255_255
    frame data/chars/misc/items/soda2.png

Code:
name tea
type item
mp 25

anim idle

    offset 15 13
    delay 80
    bbox 2 0 26 15
    loop 1
    frame data/chars/misc/items/tea.png
    delay 3
    drawmethod tintmode 1
    drawmethod tintcolor 255_255_255
    frame data/chars/misc/items/tea.png




EDIT: I just realized I got a couple of errors in enemy's ondrawscript, so I just corrected this. And now the flow of the bar is solved. I forgot to fix the entity identifier which I left it with P1 and changed it to self. Also, player's lifebar is working now.

C:
void main(){
    void self = getlocalvar("self");
    int P1 = getplayerproperty(0, "entity");
    int P2 = getplayerproperty(1, "entity");
    int P3 = getplayerproperty(2, "entity");
    int P4 = getplayerproperty(3, "entity");
    void mStyle = getglobalvar("musicStyle");
    void barEnemyG = getglobalvar("barEnemyG");
    void barEnemyR = getglobalvar("barEnemyR");
    void barEnemyB = getglobalvar("barEnemyB");
    int HP = getentityproperty(self, "health");
    int maxHP = getentityproperty(self, "maxhealth");
    int Health = 59*HP/maxHP;

    int Green = rgbcolor(58, 184, 27);
    int Red = rgbcolor(147, 32, 19);
    int Blue = rgbcolor(31, 86, 214);

    if(!barEnemyG){
        barEnemyG = loadsprite("data/sprites/barEnemyG.png");
    }

    if(!barEnemyB){
        barEnemyB = loadsprite("data/sprites/barEnemyB.png");
    }

    if(!barEnemyR){
        barEnemyR = loadsprite("data/sprites/barEnemyR.png");
    }

    if(getentityvar(self, "teki") == NULL()){
        setentityvar(self, "teki", Health);
    }

    if(findtarget(P1) != NULL()){
        if(mStyle == 0){
            drawbox((94-getentityvar(self, "teki")), 60, getentityvar(self, "teki"), 1, 9000, Green, 0); //x-94,y-60
            drawbox((93-getentityvar(self, "teki")), 61, getentityvar(self, "teki"), 1, 9000, Green, 0); //x-93,y-61
            drawbox((92-getentityvar(self, "teki")), 62, getentityvar(self, "teki"), 1, 9000, Green, 0); //x-92,y-62
            drawsprite(barEnemyG, 25, 44, 8000);
        }else if(mStyle == 1){
            drawsprite(barEnemyR, 25, 44, 8000);
            drawbox((94-getentityvar(self, "teki")), 60, getentityvar(self, "teki"), 1, 9000, Red, 0);
            drawbox((93-getentityvar(self, "teki")), 61, getentityvar(self, "teki"), 1, 9000, Red, 0);
            drawbox((92-getentityvar(self, "teki")), 62, getentityvar(self, "teki"), 1, 9000, Red, 0);

        }else if(mStyle == 2){
            drawsprite(barEnemyB, 25, 44, 8000);
            drawbox((94-getentityvar(self, "teki")), 60, getentityvar(self, "teki"), 1, 9000, Blue, 0);
            drawbox((93-getentityvar(self, "teki")), 61, getentityvar(self, "teki"), 1, 9000, Blue, 0);
            drawbox((92-getentityvar(self, "teki")), 62, getentityvar(self, "teki"), 1, 9000, Blue, 0);
        }
    }

    if(Health < getentityvar(self, "teki")){
        if(getentityvar(self, 1) == NULL()){
            setentityvar(self, 1, 0);
        }
        setentityvar(self, 1, getentityvar(self, 1)+1);
        if(getentityvar(self, 1) > 3){
            setentityvar(self, "teki", getentityvar(self, "teki")-1);
            setentityvar(self, 1, 0);
        }
    }

}

void oncreate(){
    void barEnemyG;
    void barEnemyR;
    void barEnemyB;

    if(!barEnemyG){
        barEnemyG = loadsprite("data/sprites/barEnemyG.png");
        setglobalvar("barEnemyG", barEnemyG);
    }

    if(!barEnemyB){
        barEnemyG = loadsprite("data/sprites/barEnemyB.png");
        setglobalvar("barEnemyB", barEnemyB);
    }

    if(!barEnemyR){
        barEnemyR = loadsprite("data/sprites/barEnemyR.png");
        setglobalvar("barEnemyR", barEnemyR);
    }

}

void ondestroy(){
    void barEnemyG;
    void barEnemyR;
    void barEnemyB;

    if(barEnemyG){
        free(barEnemyG);
        setglobalvar("barEnemyG", NULL());
    }

    if(barEnemyR){
        free(barEnemyR);
        setglobalvar("barEnemyR", NULL());
    }

    if(barEnemyB){
        free(barEnemyB);
        setglobalvar("barEnemyB", NULL());
    }

}

However, what remains left now is the increase of the MP and life bars. Even with the MP bar moving and leading smoothly, so you would have the 2 top boxes and the last one at max meter that should always follow the MP bar. After the player gets hit with its lifebar dropped and picks items for gaining bars, it doesn't gain its own lifebar and MP every time.

How can I make the health bar move smoothly with slight (fake) gain from health point 1 all the way to its max health while respawning? It's like Super Double Dragon when Billy/Jimmy respawns after losing his life, his health bar moves all the way to its fullest.
 
Last edited:
@msmalik681 I was using your RPG-based lifebar script for moving the bars smoothly. However, when I pick up an item which replenishes the player's HP, drawbox as its lifebar doesn't gain at all. Maybe I might make a video of my SF project for showing a sample of replenishing health like Elena and Gill do. Also, I was thinking about some helper who runs and throws items to other fighters for their replenishment ala Aggressors of Dark Kombat or Samurai Shodown 2.

@Kratus I'm really talking about this shot here where the enemies' and players' own icons show in game. Look at the lifebars from both Axel and Hakuyo too. Both icons and lifebars are totally separate due to the lifebar being a script after looking inside the data folder. I'm trying to draw the enemy's lifebar when his icon picture displays every he gets hit. How do I do that? Isn't it with onspawnscript? I have no clue which part of script does that.

1. Player hits enemy.
2. Enemy's icon shows as well as its script lifebar every time enemy gets hit.
3, Enemy's lifebar disappears along with its icon at the same time.

8-4-2025 9-07-07 PM.png
 
@Kratus I'm really talking about this shot here where the enemies' and players' own icons show in game. Look at the lifebars from both Axel and Hakuyo too. Both icons and lifebars are totally separate due to the lifebar being a script after looking inside the data folder. I'm trying to draw the enemy's lifebar when his icon picture displays every he gets hit. How do I do that? Isn't it with onspawnscript? I have no clue which part of script does that.

1. Player hits enemy.
2. Enemy's icon shows as well as its script lifebar every time enemy gets hit.
3, Enemy's lifebar disappears along with its icon at the same time.
@maxman It works by simply detecting the current opponent inside the updated.c event. Then any script that runs during the detection will sync with the native enemy icon.

Code:
void target = getentityproperty(player, "opponent");

if(target != NULL())
{
    doSomething();
}
 
Sounds odd never tested getting life back as it only runs on enemies. Have not looked at that code in ages. Right now i want to finish final blow but i will review it after.
 
@maxman It works by simply detecting the current opponent inside the updated.c event. Then any script that runs during the detection will sync with the native enemy icon.

Code:
void target = getentityproperty(player, "opponent");

if(target != NULL())
{
    doSomething();
}
OK. I added this script for the enemy character's unique HUD to display, but it doesn't. Also, I'm having trouble with assigning enemy's HUD positions based on the player indexes of its position. If you take a look at the variable xAdd in it, you will see that I'm trying to assign it according to where players' HUDs are at.

This one is imported from updated.c.

enemyhud.c:
C:
void enemyHUD(int player){
    if(openborvariant("in_level") == 1){
    void target = getentityproperty(player, "opponent");

    if(target != NULL()){
        void mStyle = getglobalvar("musicStyle");
        void barEnemyG = getglobalvar("barEnemyG");
        void barEnemyR = getglobalvar("barEnemyR");
        void barEnemyB = getglobalvar("barEnemyB");
        int HP = getentityproperty(target, "health");
        int maxHP = getentityproperty(target, "maxhealth");
        int Health = 59*HP/maxHP;

        int Green = rgbcolor(58, 184, 27);
        int Red = rgbcolor(147, 32, 19);
        int Blue = rgbcolor(31, 86, 214);

        int xPos1 = 94; // Lifebars X
        int yPos1 = 60; // Lifebars Y

        int xPos2 = 25; // Sprite X
        int yPos2 = 44;    // Sprite Y

        int xAdd = 120; // For specific player's position

        if(!barEnemyG){
            barEnemyG = loadsprite("data/sprites/barEnemyG.png");
        }

        if(!barEnemyB){
            barEnemyB = loadsprite("data/sprites/barEnemyB.png");
        }

        if(!barEnemyR){
            barEnemyR = loadsprite("data/sprites/barEnemyR.png");
        }

        if(getentityvar(target, "teki") == NULL()){
            setentityvar(target, "teki", Health);
        }

        if(mStyle == 0){
            drawbox((xPos1-getentityvar(target, "teki")), yPos1, getentityvar(target, "teki"), 1, 9000, Green, 0); //x-94,y-60
            drawbox((xPos1-1-getentityvar(target, "teki")), yPos1+1, getentityvar(target, "teki"), 1, 9000, Green, 0); //x-93,y-61
            drawbox((xPos1-2-getentityvar(target, "teki")), yPos1+2, getentityvar(target, "teki"), 1, 9000, Green, 0); //x-92,y-62
            drawsprite(barEnemyG, xPos2, yPos2, 8000); //x-25,y-44
        }else if(mStyle == 1){
            drawsprite(barEnemyR, xPos2, yPos2, 8000);
            drawbox((xPos1-getentityvar(target, "teki")), yPos1, getentityvar(target, "teki"), 1, 9000, Red, 0);
            drawbox((xPos1-1-getentityvar(target, "teki")), yPos1+1, getentityvar(target, "teki"), 1, 9000, Red, 0);
            drawbox((xPos1-2-getentityvar(target, "teki")), yPos1+2, getentityvar(target, "teki"), 1, 9000, Red, 0);

        }else if(mStyle == 2){
            drawsprite(barEnemyB, xPos2, yPos2, 8000);
            drawbox((xPos1-getentityvar(target, "teki")), yPos1, getentityvar(target, "teki"), 1, 9000, Blue, 0);
            drawbox((xPos1-1-getentityvar(target, "teki")), yPos1+1, getentityvar(target, "teki"), 1, 9000, Blue, 0);
            drawbox((xPos1-2-getentityvar(target, "teki")), yPos1+2, getentityvar(target, "teki"), 1, 9000, Blue, 0);
        }

        if(Health < getentityvar(target, "teki")){
            if(getentityvar(target, 1) == NULL()){
                setentityvar(target, 1, 0);
            }
            setentityvar(target, 1, getentityvar(target, 1)+1);
            if(getentityvar(target, 1) > 3){
                setentityvar(target, "teki", getentityvar(target, "teki")-1);
                setentityvar(target, 1, 0);
            }
        }

    }
    } // End of in-level
} // End of particular function

I'm missing something.
 
Back
Top Bottom