http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
I'm checking, as I remember something about circular collision, and I never saw your code. Often, circular collision looks like this:
...but as you say you used ew->Power, my original point stands, as this may be something that needs examination.Code:if ( CircularCollision(ew->x, ew->Y, radius1, Link->X, Link->Y, radius2) Link->HP -= val;
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
It's ew->Damage, isn't it? Itemclasses are the ones that use Power I thought. But anyways, yes, I did use a weapon with ew->Damage.
Also, crossposting from the PureZC thread:
I wrote a global script for the old shooter behavior in case anybody else is rustled by the change like Anarchy_Balsac was. Just set the Shooter (Fireball) enemy's weapon to none, put the function in your global script, and your shooters will once again have no mercy.Code:const int NPCM_SHOTCOOLDOWN = 0; //NPC->Misc used for fireball shooter cooldown const int FIREBALL_SHOOTER_COOLDOWN = 80; //Duration of fireball shooter cooldown in frames const int FIREBALL_SHOOTER_CHANCE = 64; //Chance of firing every frame void UnforgivingShooters(){ for(int i=1; i<=Screen->NumNPCs(); i++){ //Loops through every enemy, every frame. If you have an enemy loop in your global already, you'll want to combine them npc n = Screen->LoadNPC(i); if(n->ID==NPC_SHOOTFBALL){ //Detect the fireball shooter if(n->Misc[NPCM_SHOTCOOLDOWN]<=FIREBALL_SHOOTER_COOLDOWN){ //Increase the shot timer until the cooldown is over n->Misc[NPCM_SHOTCOOLDOWN]++; } else if(Rand(FIREBALL_SHOOTER_CHANCE)==0){ //Once the cooldown has ended, has a random chance of firing a weapon every frame Game->PlaySound(SFX_FIREBALL); eweapon fball = CreateEWeaponAt(EW_FIREBALL, n->X, n->Y); fball->Angular = true; fball->Angle = DegtoRad(Angle(n->X, n->Y, Link->X, Link->Y)); fball->Dir = AngleDir4(Angle(n->X, n->Y, Link->X, Link->Y)); fball->Step = 150; fball->UseSprite(17); fball->Damage = n->WeaponDamage; n->Misc[NPCM_SHOTCOOLDOWN] = 0; } } } }
Last edited by Tamamo; 10-27-2015 at 10:34 AM. Reason: Fireballs have a 1 in 64 chance of firing by default. Fixed.
There are currently 1 users browsing this thread. (0 members and 1 guests)