Here's another hint...
Use a shooter type but change the weapon to none.
Printable View
Here's another hint...
Use a shooter type but change the weapon to none.
That is what I would expect, and probably what is supposed to happen, but apparently not what Moosh experienced with simultaneous hits. I suspect that damage is calculated before the invincibility frames occur; and in some circumstances it can be applied from more than one source. In fact, I told him that the second collision shouldn't count, for just those reasons...but seemingly it can.
@CJC : That's always going to be true, because the hits do not occur in the same frame.
It's not that important, but at least I remembered to ask.
@Moosh Get your arse over here, and detail that problem you had with simultaneous collisions with your 'Death' enemy.
Okay, so it was a dark and stormy night...I was scripting a scythe swinging attack for a boss in Freedom in Chains. The attack had a slash animation made up of about 20 gradually shrinking circle draw commands. I wanted the whole thing to have collision, so I put weapons of approximately the same size under each circle and used ghost.zh to make them only last for one frame. I assumed it would only hit Link once per frame, but in testing it was an instant kill, way more than I'd set the weapons to deal. I figured ZC combines the damage of every weapon colliding with Link in the frame he gets hurt and so I switched to scripted collision instead. With only one weapon being created under Link when he collided with the attack, it worked fine.
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;
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;
}
}
}
}
That is correct, power is from itemclasses and it's writable too but isn't saved.
And good job @Moosh , I'll cross check it with the source for yeah.
http://2.bp.blogspot.com/-DGGcdZ4KYb...hrough-you.png
@Gleeok
Let's put my theory to the test shall we.
Code://Only new quest rules that make use of deprecated quest rule space should use this. -T
int get_questrule(byte *bitstr,int bit,zquestheader *Header)
{
if(Header.zelda_version < 0x253) //didn't exist yet, and these probably did. so we can't chance it.
return 0;
else
{
bitstr += bit>>3;
return ((*bitstr) >> (bit&7))&1;
}
}