Jump to content

Photo

Can script weapons break or bypass darknut shields?

darknut shield break bypass script

  • Please log in to reply
6 replies to this topic

#1 Anarchy_Balsac

Anarchy_Balsac

    Quest Builder

  • Members

Posted 04 October 2015 - 03:06 PM

Topic title.  I prefer bypassing if it's possible, if not, I'll take breaking it.



#2 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 04 October 2015 - 04:08 PM

Set the weapon's deadstate to alive (-1) every frame, and change it's direction every frame. Unless the darknut has a shield on all sides, it should bypass it. Or you can give it a diagonal direction. I believe directional weapons always bypass shields.


Edited by Dimentio, 04 October 2015 - 04:09 PM.


#3 Anarchy_Balsac

Anarchy_Balsac

    Quest Builder

  • Members

Posted 04 October 2015 - 04:11 PM

Set the weapon's deadstate to alive (-1) every frame, and change it's direction every frame. Unless the darknut has a shield on all sides, it should bypass it. Or you can give it a diagonal direction. I believe directional weapons always bypass shields.

 

Sounds like that would work great for melee weapons, but what about projectiles?  Wouldn't doing that render the projectile immobile?



#4 Saffith

Saffith

    IPv7 user

  • Members

Posted 04 October 2015 - 04:21 PM

If the weapon's angular, you can set its direction to -1 and it'll be unblockable. For non-angular weapons, you have to use alternate directions.
 
int UnblockableDir(int dir)
{
    if(dir==DIR_UP)
        return 8;
    if(dir==DIR_DOWN)
        return 12;
    if(dir==DIR_LEFT)
        return 14;
    if(dir==DIR_RIGHT)
        return 10;
    if(dir==DIR_LEFTUP)
        return 15;
    if(dir==DIR_RIGHTUP)
        return 9;
    if(dir==DIR_LEFTDOWN)
        return 13;
    if(dir==DIR_RIGHTDOWN)
        return 11;
    
    // Should never get here
    return dir;
}

  • Anarchy_Balsac and Timelord like this

#5 Anarchy_Balsac

Anarchy_Balsac

    Quest Builder

  • Members

Posted 04 October 2015 - 04:31 PM

If the weapon's angular, you can set its direction to -1 and it'll be unblockable. For non-angular weapons, you have to use alternate directions.
 

int UnblockableDir(int dir)
{
    if(dir==DIR_UP)
        return 8;
    if(dir==DIR_DOWN)
        return 12;
    if(dir==DIR_LEFT)
        return 14;
    if(dir==DIR_RIGHT)
        return 10;
    if(dir==DIR_LEFTUP)
        return 15;
    if(dir==DIR_RIGHTUP)
        return 9;
    if(dir==DIR_LEFTDOWN)
        return 13;
    if(dir==DIR_RIGHTDOWN)
        return 11;
    
    // Should never get here
    return dir;
}

If I'm reading this correctly, unblockable directions are effectively Blockable + 8, right?



#6 Saffith

Saffith

    IPv7 user

  • Members

Posted 04 October 2015 - 04:59 PM

No, they're numbered clockwise, starting from up.

#7 Anarchy_Balsac

Anarchy_Balsac

    Quest Builder

  • Members

Posted 04 October 2015 - 05:24 PM

No, they're numbered clockwise, starting from up.

 

Damn, well, that only slightly over-complicates things.  I got it working either way though, so thanks for the help.





Also tagged with one or more of these keywords: darknut, shield, break, bypass, script

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users