Topic title. I prefer bypassing if it's possible, if not, I'll take breaking it.
Can script weapons break or bypass darknut shields?
#1
Posted 04 October 2015 - 03:06 PM
#2
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
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
Posted 04 October 2015 - 04:21 PM
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
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
Posted 04 October 2015 - 04:59 PM
#7
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
Zelda Classic →
Scripting Discussion →
Is Tango still relevant ? (2.55 Alpha 115)Started by Pier , 19 Sep 2023 Tango, 2.55, Alpha 115, String and 2 more... |
|
|
||
Zelda Classic →
Scripting Discussion →
Requests [The Crystal Heart]Started by Ica , 01 Feb 2022 request, help, custom items and 2 more... |
|
|
||
Zelda Classic →
Scripting Discussion →
Boomerang Specific Item PickupStarted by DietWater , 22 Mar 2021 Boomerang, Puzzle, FFC, Script |
|
|
||
zconsole
Zelda Classic →
ZC Development →
Replacements for the ZConsoleStarted by Timelord , 13 Jun 2019 zconsole, script, debugger, log and 1 more... |
|
|
||
|
Alpha
Zelda Classic →
ZC Development →
Zelda Classic 2.55 Alpha 17 (Official)Started by Timelord , 09 Apr 2019 Alpha, Æternal, AEternal, 2.55 and 4 more... |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users