Solved Simulate Boss death for a normal enemy (?)

Question that is answered or resolved.

Crimsondeath

Active member
Well something I noticed when a boss dies in OpenBOR (besides the classic slowmotion screen xd) is that the stage stop scrolling if player walks on the edge of the screen, obstacles became unbreakable and items with 'itembox' (the hit box to pick up the item just touching it) stop working.

So I want to know If it's posible to control those variables with scripts?

For example: When I kill a normal enemy (that simulate being a boss or miniboss), I want the stage stop scrolling, obstacles became unbreakable while the enemy is playing his death animation and them return those properties to normal.

(If my explanation is not clear I can make a video later about it 😣)

About the items with 'itemboxes' I don't want they became unpickable, but it's posible to make pickable the items while a real enemy boss is dying?

I can do the slowmotion effect but what can I do to simulate the others properties 🙁 ? changeentityproperties or the changeopenborvariants?

Thanks in advance :)
 
Solution
TBH I never liked the other features of boss death i.e unbreakable obstacles and unpickable items. Well no scrolling could be accepted to focus on boss' death animation.
Scroll lock could be done by modifying scroll speed with script but I don't know if there were any direct script to create the former. The best way I have in mind currently is script to find all obstacles and items then apply immunity to obstacles and alter candamage to items briefly before reverting them back to normal.
TBH I never liked the other features of boss death i.e unbreakable obstacles and unpickable items. Well no scrolling could be accepted to focus on boss' death animation.
Scroll lock could be done by modifying scroll speed with script but I don't know if there were any direct script to create the former. The best way I have in mind currently is script to find all obstacles and items then apply immunity to obstacles and alter candamage to items briefly before reverting them back to normal.
 
Solution
Thanks @Bloodbane,
well that's like I had in mind, I was just asking if there are better ways (Thanks for the scrollspeed tip, I didn't know it can stop completely the scrolling :LOL:).

I did a small animationscript to simulate those effects, I just changed the "candamage" for players to become obstacles "unbreakable", here is the script if someone need it:

C++:
void SimulateBossDeath (int activo){
// How to use
// You need to activate it first on the boss death animation: "@cmd    SimulateBossDeath 1"
// And them deactivated on the frame you want to stop: "@cmd    SimulateBossDeath 0"
// Don't invert the order or your players will damage nothing xd.
    int P1 = getplayerproperty(0, "entity");
    int P2 = getplayerproperty(1, "entity");
    void P1Candamage;
    void P2Candamage;

    if(activo==1){
        // changeopenborvariant("slowmotion", 1); // Uncomment this line If you need the slow motion effect
        changelevelproperty("scrollspeed", 0);
        if(P1){
            P1Candamage = getentityproperty(P1, "candamage");
            setglobalvar("P1Candamage", P1Candamage);
            changeentityproperty(P1, "candamage", openborconstant("TYPE_SHOT")); // Candamage "none" xd
        }
        if(P2){
            P2Candamage = getentityproperty(P2, "candamage");
            setglobalvar("P2Candamage", P2Candamage);
            changeentityproperty(P2, "candamage", openborconstant("TYPE_SHOT")); // Candamage "none" for player 2 xd
        }
    }else{
           // changeopenborvariant("slowmotion", 0); // Uncomment this line to stop the slow motion effect
           changelevelproperty("scrollspeed", 1);
           if(P1){
            P1Candamage = getglobalvar("P1Candamage");
            changeentityproperty(P1, "candamage", P1Candamage);
        }
        if(P2){
            P2Candamage = getglobalvar("P2Candamage");
            changeentityproperty(P2, "candamage", P2Candamage);
        }
    }
}

Later I'll probably add the "candamage" property for items, I don't need it for now. Thanks again :)
 
Last edited:
@Crimsondeath

in night slashers there are lot of fake bosses, they drop an item/entity called bosser when they are killed, bosser simulates a boss death and kills all enemies as far as i can remember the items can be picked up, but you will have to check out if the other issues you mentioned still happen...
the bosser thing can be modified to add other stuff you want

and if you look in the forum you might find the "bosser" script somewhere so you dont have to download NS
 
@Crimsondeath

in night slashers there are lot of fake bosses, they drop an item/entity called bosser when they are killed, bosser simulates a boss death and kills all enemies as far as i can remember the items can be picked up, but you will have to check out if the other issues you mentioned still happen...
the bosser thing can be modified to add other stuff you want

and if you look in the forum you might find the "bosser" script somewhere so you dont have to download NS
Thanks for the info, I'll check that.
 
Back
Top Bottom