Booster pack

Temporary boosters pack 2

No permission to download

Bloodbane

Well-known member
Couple weeks ago, kdo asks something in a thread which could be answered with temporary booster. I've given him the requested booster. However it was incomplete and needs improvement.

Instead of going offtopic there, I decided to create new thread for this booster. Here they are:

Boosters pack

It contains : Power Up, Defense Up, Speed Up, Speed Down and Invincibility

Read included notes for details on each booster and how to modify them.
kdo: Both Speed Up and Speed Down have been improved to affect running speed and jumping speed as well.
 
Wonderful!! I've been busy these days, but I'm going to check it out as soon as I can. :)
Thanks again Bloodbane ... this will help the community a lot.
I will start working on my projects again soon ... thanks my friend.
 
@O Ilusionista

if ti helps any - on NS players 3 and 4 where not able to do their anti-damage move, and i managed to fix this by modifying some scripts - if those booster things work in a similar way, then taking a look at the changes might help you -
is you use agent ransack or if notepad ++ is able to "batch" search within .text & script files look for "new 2025" or 24 within the scripts folder- i also keep the original files in most cases for comparison
 
@Bloodbane bumping this old topic, I am using your booster pack and they are great.
But I noticed a bug: the effect works if P1 gets it. Any other player is ignored.

Ah you're right :) . I've just checked it and apparently I've updated files for booster pack but haven't updated the pack in mediafire 😅.
I'll pack the updated files and upload it later.

[Some time later]

Alright, it has been uploaded and you can get the updated files here.
 
Last edited:
Ah you're right :) . I've just checked it and apparently I've updated files for booster pack but haven't updated the pack in mediafire 😅.
I'll pack the updated files and upload it later.

[Some time later]

Alright, it has been uploaded and you can get the updated files here.
Thanks buddy, I've tried them and now it works for all players :)
Also, I've linked the discussion thread to the resource
 
I have a problem when it comes to item pickups using didhitscript as an item type. This results the player's life number a 1-up after picking it up. I don't understand how a 1-up point gains like this. How can I disable it from gaining 1-up?

Code:
name Bread
type item
health 75
didhitscript data/scripts/didhit/item.c
load Food

anim idle

loop 1
offset 31 25
delay 99
bbox 11 3 41 27
frame data/chars/misc/items/food/bread.png
delay 4
frame data/chars/misc/items/food/bread.png

C:
void main()
{//Script for item
    void self = getlocalvar("self");
    void target = getlocalvar("damagetaker");
    char Item = getentityproperty(self,"defaultname");

    int index = getentityproperty(target,"playerindex");
    int score = getplayerproperty(index, "score");
    void Spawn;

    if(Item == "PoisonOrb"){
        killer("Spdwn"+target);
        Spawn = spawnbind("Spdwn", target, 0, 0, 0, 0, 0);
        changeentityproperty(Spawn, "name", "spdwn"+target);
        changeentityproperty(Spawn, "parent", target);
    }else if(Item == "LightningOrb"){
        killer("Spup"+target);
        Spawn = spawnbind("Spup", target, 0, 0, 0, 0, 0);
        changeentityproperty(Spawn, "name", "Spup"+target);
        changeentityproperty(Spawn, "parent", target);
    }else if(Item == "IceOrb"){
        int eTime = openborvariant("elapsed_time");

        changeentityproperty(target, "invincible", 1); // Gives invincibility
        changeentityproperty(target, "invinctime", eTime + 1000); // for about 10 seconds
        changeentityproperty(target, "blink", 1);
    }else if(Item == "Apple" || Item == "Bread"){ // Eat Food
        killer("Food"+target);
        Spawn = spawnbind("Food", target, 0, 0, 0, 0, 0);
        changeentityproperty(Spawn, "name", "Food"+target);
        changeentityproperty(Spawn, "parent", target);
    }

    changeplayerproperty(index, "score", score-1);
    killentity(self);
}

void spawn01(void vName, float fX, float fY, float fZ)
{
    //spawn01 (Generic spawner)
    //Damon Vaughn Caskey
    //07/06/2007
    //
    //Spawns entity next to caller.
    //
    //vName: Model name of entity to be spawned in.
    //fX: X location
    //fY: Y location
    //fZ: Z location

    void self = getlocalvar("self"); //Get calling entity.
    void vSpawn; //Spawn object.

    clearspawnentry(); //Clear current spawn entry.
    setspawnentry("name", vName); //Acquire spawn entity by name.

    vSpawn = spawn(); //Spawn in entity
    changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.

    return vSpawn; //Return spawn
}

void spawnbind(void Name, void Target, float dx, float dy, float dz, int Dir, int Flag)
{ // Spawn entity and bind it
    void self = getlocalvar("self");
    void Spawn;

    Spawn = spawn01(Name, dx, dy, dz);
    bindentity(Spawn, Target, dx, dz, dy, Dir, Flag);

    return Spawn;
}

void killer(void vName)
{
    void vEntity;                                       //Target entity placeholder.
    int  iEntity;                                       //Entity enumeration holder.
    char iName;                                         //Entity Name.
    int  iMax = openborvariant("count_entities");       //Entity count.

      //Enumerate and loop through entity collection.
    for(iEntity=0; iEntity<iMax; iEntity++){
        vEntity = getentity(iEntity);                 //Get target entity from current loop.
        iName   = getentityproperty(vEntity, "name"); //Get target's default name

        //Same default name as defined?
        if(iName == vName){
            killentity(vEntity);
        }
    }
}

Code:
name Food
type none
icon data/chars/xxxxxx/icon-eating-test.png
setlayer 1000000
animationscript data/scripts/animation.c

iconposition 0 0
lifebarstatus 100 7 0 1 0 -9999 -9999 -9999 -9999
lifeposition 72 -15
nameposition 72 -50

anim idle
offset 1 1
delay 54
frame none
@cmd suicide
frame none

EDIT: I want to make them act like normal items when picking up.
 
Last edited:
Thanks, Bloodbane. Setting score 1 in the character header works well without gaining 1-up, but I don't understand why the player's score initially increases to 1 instead of retaining its score from gaining (especially score 0 from the very beginning of the level). After that, it's gonna be okay. My worry is its initial score increase in the beginning like picking up the first item before doing anything.

Code:
name Bread
type item
health 75
didhitscript data/scripts/didhit/item.c
load Food
score 1

anim idle

loop 1
offset 31 25
delay 99
bbox 11 3 41 27
frame data/chars/misc/items/food/bread.png
delay 4
frame data/chars/misc/items/food/bread.png

Do I have to add score 1 in every item entity that has its didhitscript for item pickups? How can I prevent the player's score from initially increasing in its first run after setting score to 0, especially in training mode?

EDIT: Nevermind. Maybe I would ask in another topic about preventing initial score increase after pickup since this is about powerups with allowing initial score increase.
 
Last edited:
Back
Top Bottom