Need Help with Slam Start, Position, Throw, Dropv (negative value)

Bruce

Active member
Hello everyone,

As the tile says I am having issues with slam scripts and attack dropv - in the Openbor Template.
I am trying to set up the air throw or air down slash, but for some reasons nothing works.
I was able to make them work in the FF LNS, but not in the Openbor Template.
dropv -7 1 (even with dropv -30 1) is supposed to make the enemy fall down quickly, but it isn't working either!

Obviously, I am missing something or doing something wrong!
Can someone please help me with this?
Thank you

Here is the code:

Dante entity:
Code:
name        Dante
type        Player
health        1000
mp            700
mprate        5
speed        32
jumpheight    12
jumpspeed    50


animationscript    data/scripts/anim/Grabs_Anim.c

....
....

anim    freespecial15
    landframe 12
    hitfx    data/sounds/beat.wav
    hitflash    flash
    loop        0
    offset    346 524
    bbox     290 270 140 170
    delay     3
     @cmd    SlamStart
    @cmd    EnemyPosition 0 10 -10 1 0  # Tframe, X Y Z, face, NoWeight
    @cmd    dasher 0 6 0  # X Y Z
    frame    data/chars/Dante/DownSlash01.png
    frame    data/chars/Dante/DownSlash02.png
    frame    data/chars/Dante/DownSlash03.png
    frame    data/chars/Dante/DownSlash04.png
    frame    data/chars/Dante/DownSlash05.png
    frame    data/chars/Dante/DownSlash06.png
    frame    data/chars/Dante/DownSlash07.png
    delay    5
    frame    data/chars/Dante/DownSlash08.png
    frame    data/chars/Dante/DownSlash09.png
    delay    10
    bbox        0 0 0 0
    offset    186 693
    frame    data/chars/Dante/DownSlash10.png
    attack    444 520 280 277 5  100 100 0 5 30
    dropv    -7 1
    @cmd    dasher 0 -3 0  # X Y Z
    forcedirection -1
    offset    184 860
    frame    data/chars/Dante/DownSlash11.png
    attack    0 0 0 0
    delay     999
    offset    190 895
    frame    data/chars/Dante/DownSlash12.png
    attack    440 820 260 147 10  100 100 0 30 30
    dropv    0 1
    sound    data/sounds/slash3.wav
    @cmd    EnemyPosition 5 10 1 0 -1
    @cmd    ScreenBound -62 0 0 0 1
     @cmd    ReleaseGrabbedEntity 0
    @cmd    ThrowEnemy 10 3 10 10 0 1 # damage, type, XYZ, face
    @cmd    clearL
    offset    203 910
    delay    5
    bbox     290 270 140 170
    frame    data/chars/Dante/DownSlash13.png
    frame    data/chars/Dante/DownSlash13.png
    delay    5
    frame    data/chars/Dante/DownSlash14.png
    frame    data/chars/Dante/DownSlash15.png

Grabs_Anim scripts:

Code:
//from Kratus's SORX and others

void SlamStart() // Slam Starter for Cody/Guy grabbackward
{ // Slam Starter for nongrab slams
// Use Slam or ThrowEnemy after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL4")); // Slam Starter
   }
}

void EnemyPosition(int tFrame, float dx, float dy, float dz, int face, void noWeight)
{//Modify grabbed entity's position relative to grabber
 //Use Grabstart or SlamStart 1st before using this
    void self        = getlocalvar("self");
    void target    = getentityvar(self,"grabbed");
    int vFrame    = getentityproperty(self,"animpos");
    int dead        = getentityproperty(target,"dead");
    float weight    = getentityproperty(target,"antigravity");
    float limit    = -0.03;

    //THERE'S A NEW TARGET SAVED IN THE VARIABLE??
    if(target != NULL()){

        //USED WHEN PLAYER DIES BY TIME OVER AND THE GRABBER IS THE ENEMY
        if(dead){
            bindentity(target, NULL());
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL"));
            damageentity(self, self, 0, 1, openborconstant("ATK_NORMAL"));
            lockMpG();
            setentityvar(self, "grabbed", NULL());
        }else

        //USED WHEN THE OPPONENT IS TOO HEAVY AND THE THROW/SLAM NEED TO BE INTERRUPTED (SOR1 BONGO)
        if(weight < limit && !noWeight && vFrame > 1){
            bindentity(target, NULL());
            damageentity(self, self, 2, 1, openborconstant("ATK_LAND"));
            lockMpG();
            setentityvar(self, "grabbed", NULL());
        }else
        
        //DEFAULT
        {
            updateframe(target, tFrame);
            bindentity(target, self, dx, dz, dy, face, 0);
        }
    }
}

void ReleaseGrabbedEntity(int ToGround)
{// Release grabbed entity
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     bindentity(target, NULL());

     if(ToGround == 1)
     {
       int x = getentityproperty(target, "x");
       int z = getentityproperty(target, "z");
       changeentityproperty(target, "position", x, z, 0);
     }
   }
}

void ThrowEnemy(int damage, int type, int Vx, int Vy, int Vz, int face)
{//Damage as throw finisher
    void self    = getlocalvar("self");
    void target = getentityvar(self,"grabbed");
    int z          = getentityproperty(self,"z");
    int tDir    = getentityproperty(target,"direction");
    int vDir;
    
    if(face == 0){ //SAME FACING?
        vDir = tDir;
    }

    if(face == 1){ //OPPOSITE FACING?
        if(tDir == 0){ //FACING LEFT?
            vDir = 1;
        }
        else
        {
            vDir = 0;
        }
    }

    if(target != NULL()){
        void atkType;
        void eType    = getentityproperty(target,"type");
        int dir        = getentityproperty(target,"direction");
        int dropType    = 1;
        
        if(dir == 0){Vx = -Vx;}
        if(type == 1){atkType = openborconstant("ATK_NORMAL8");}
        if(type == 2){atkType = openborconstant("ATK_NORMAL9");}
        
        if(eType == openborconstant("TYPE_PLAYER") || eType == openborconstant("TYPE_NPC")){
            changeentityproperty(target, "projectilehit", "type_player", "type_npc", "type_obstacle");
        }
        else
        if(eType == openborconstant("TYPE_ENEMY")){
            changeentityproperty(target, "projectilehit", "type_enemy", "type_obstacle");
        }
        
        damageentity(target, self, 0, dropType, atkType);
        lockMpG();

        //AUTOMATICALLY REDUCES THE JUGGLEPOINTS TO ZERO IN ANY THROW/SLAM
        if(getglobalvar("juggleSystem") == "off"){changeentityproperty(target, "jugglepoints", 0);}

        changeentityproperty(target, "direction", vDir);
        changeentityproperty(target, "damage_on_landing", damage); //RESET PROJECTILE STATUS TO 0 WHEN FALL ON THE GROUND, TOTAL DAMAGE
        changeentityproperty(target, "aiflag", "projectile", 1);
        FinishGrab(Vx, Vy, Vz); //EXECUTE ALL NECESSARY TASKS TO END THE GRAB MOVE (ANTIWALL, UNBIND AND TOSSENTITY)
        setentityvar(self, "grabbed", NULL()); //CLEAR ENTITYVAR
    }
}

void clearL()
{ // Clears all local variables
     clearlocalvar();
}

void Screenbound()
{
.....
...
}

Basically, the code is almost exact the same thing on this site. I just modified them a bit for better understanding
I am still learning about these scripts, so hopefully someone can help me understand these scripts better,

Thank you so much.
 
Solution
dropv -7 1 (even with dropv -30 1) is supposed to make the enemy fall down quickly, but it isn't working either!

Vertical downward velocity is maxed to 6 pixels percentisecond. You' need to increase the limit by using maxfallspeed in level text. Set something like maxfallspeed -200 and see if this solves the issue.
dropv -7 1 (even with dropv -30 1) is supposed to make the enemy fall down quickly, but it isn't working either!

Vertical downward velocity is maxed to 6 pixels percentisecond. You' need to increase the limit by using maxfallspeed in level text. Set something like maxfallspeed -200 and see if this solves the issue.
 
Solution
Yeah, like Bloodbane said, you need to increase the maxfallspeed on your stage settings.
Without it, the only way to bypass this is using updatescript (like I did on the past), but changing maxfallspeed is a way better option
 
Vertical downward velocity is maxed to 6 pixels percentisecond. You' need to increase the limit by using maxfallspeed in level text. Set something like maxfallspeed -200 and see if this solves the issue.
I thought I had both gravity and maxfallspeed on the level design after O Ilusionista mentioned about them in another topic.
I just checked it, and somehow I commented out the maxfallspeed for some reasons.
I uncommented it and now it is working fine, thank you.

The SlamStart, Position, and Throw are still not working. When I have more time, I will to do more tests and report back the results.

Thank you very much everyone


Edited:

Reporting the results.
I've even tried the ground throws, same results: the EnenemyPosition and ThrowEnemy functions don't work at all.
There must be something missing....

Edited2:
I just copied the scripts (I think the FF LNS team copied from Bloodbane on this site) that I had from FF LNS, and it is working fine.
I guess Kratus's scripts are more advance which needs more requirements in order to make them work properly.
 
Last edited:
Quick newbie queston, im binding entity in get anim, but i want to control bind coords of this entity in my walk anim too so i dont need to bother changing coords in actual entity thats bind to player, how do i acquire this entity to control it in walk ?
I have this in players get anim.


Code:
                @script
                void self = getlocalvar("self");
                 void har;
             if ( frame == 1 ){
                clearspawnentry();
    setspawnentry("name", "drumbind");
    har = spawn();
   bindentity(har, self, 30, 0, 0, -1, 6,1);
        }
                     if ( frame == 3 ){
    bindentity(har, self, 0, 0, 20, -1, 6,1 );
        }
                     if ( frame == 4 ){
    bindentity(har, self, -10, 0, 80, -1, 6,1 );
        }
                     if ( frame == 5 ){
    bindentity(har, self, -20, 0, 200,-1,  6,1 );
        }
                     if ( frame == 6 ){
    bindentity(har, self, -35, 0, 280,-1, 6,-1 );
        }
    @end_script

Ok, using entityvar for this, if there i a better more reliable way , let me know


Code:
                @script

                void self = getlocalvar("self");

                 void har;

             if ( frame == 1 ){

                clearspawnentry();

    setspawnentry("name", "drumbind");

    har = spawn();

    setentityvar(self, 0, har); // Store 'har' in an entityvar of 'self'

   bindentity(har, self, 30, 0, 0, -1, 6,1);

        }

                     if ( frame == 3 ){

    bindentity(har, self, 0, 0, 20, -1, 6,1 );

        }

                     if ( frame == 4 ){

    bindentity(har, self, -10, 0, 80, -1, 6,1 );

        }

                     if ( frame == 5 ){

    bindentity(har, self, -20, 0, 200,-1,  6,1 );

        }

                     if ( frame == 6 ){

    bindentity(har, self, -35, 0, 280,-1, 6,-1 );

        }

    @end_script    





 
                    @script
                void self = getlocalvar("self");
               void har = getentityvar(self, 0);
             if ( frame == 1 ){
   bindentity(har, self, 30, 0, 0, -1, 6,1);
        }
                     if ( frame == 3 ){
    bindentity(har, self, 0, 0, 20, -1, 6,1 );
        }
                     if ( frame == 4 ){
    bindentity(har, self, -10, 0, 80, -1, 6,1 );
        }
                     if ( frame == 5 ){
    bindentity(har, self, -20, 0, 200,-1,  6,1 );
        }
                     if ( frame == 6 ){
    bindentity(har, self, -35, 0, 280,-1, 6,-1 );
        }
    @end_script
 
Last edited:
Well, you're doing it the same way as I do in my recent games. Though I spawn the other entity in SPAWN or RESPAWN animation before storing the latter in entity variable.
When it comes to weapon or accessory pickup, I don't remove previous entity for the new item but instead I set flag for the weapon/accessory to change based on the pickup. If that sounds hard to understand, you could play Barshen Below for example on that.
 
  • Like
Reactions: ABK
Yeah entityvars are necessary in those cases. do you have some entities with multiple stages of pain? tring to tackle that now, so enemies can bleed more and more etc. obstacles get destroyed more and more... al contained in 1 entity so theres no weapon involved just to display next stage of pain.
 
Back
Top Bottom