I know I'm basically spamming the forum at this point, but I always get to 99% working and can't figure out the last bit.
I'm creating a custom bomb item with a custom explosion sprite. To do this, I am spawning normal LW_BOMBBLAST lweapons (with sprites set to blank tiles) to damage enemies and trigger bomb flags, and also spawning EW_SCRIPT10 (although this could be anything, I just picked an unused EW_ constant) eweapons that have the actual bomb animation and deal damage to Link.
//Relevant const ints const int Z4BOMBDAMAGE = 4; const int Z4BOMBDAMAGESELF = 2; const int Z4BOMBBLASTEW = EW_SCRIPT10; const int Z4BOMBBLASTDUR = 32; //Create the real bomb blasts lweapon realTL = CreateLWeaponAt(LW_BOMBBLAST, this->X-8, this->Y-8); realTL->Damage = Z4BOMBDAMAGE; realTL->Z = this->Z; lweapon realTR = CreateLWeaponAt(LW_BOMBBLAST, this->X+8, this->Y-8); realTR->Damage = Z4BOMBDAMAGE; realTR->Z = this->Z; lweapon realBL = CreateLWeaponAt(LW_BOMBBLAST, this->X-8, this->Y+8); realBL->Damage = Z4BOMBDAMAGE; realBL->Z = this->Z; lweapon realBR = CreateLWeaponAt(LW_BOMBBLAST, this->X+8, this->Y+8); realBR->Damage = Z4BOMBDAMAGE; realBR->Z = this->Z; //Create the visual / hero-damaging bomb blasts eweapon linkTL = CreateEWeaponAt(Z4BOMBBLASTEW, this->X-8, this->Y-8); linkTL->Z = this->Z; linkTL->Damage = Z4BOMBDAMAGESELF; linkTL->UseSprite(Z4BOMBBLASTTL); linkTL->DeadState = Z4BOMBBLASTDUR; eweapon linkTR = CreateEWeaponAt(Z4BOMBBLASTEW, this->X+8, this->Y-8); linkTR->Z = this->Z; linkTR->Damage = Z4BOMBDAMAGESELF; linkTR->UseSprite(Z4BOMBBLASTTR); linkTR->DeadState = Z4BOMBBLASTDUR; eweapon linkBL = CreateEWeaponAt(Z4BOMBBLASTEW, this->X-8, this->Y+8); linkBL->Z = this->Z; linkBL->Damage = Z4BOMBDAMAGESELF; linkBL->UseSprite(Z4BOMBBLASTBL); linkBL->DeadState = Z4BOMBBLASTDUR; eweapon linkBR = CreateEWeaponAt(Z4BOMBBLASTEW, this->X+8, this->Y+8); linkBR->Z = this->Z; linkBR->Damage = Z4BOMBDAMAGESELF; linkBR->UseSprite(Z4BOMBBLASTBR); linkBR->DeadState = Z4BOMBBLASTDUR;
The lweapons work just fine. However, these eweapons are not actually doing damage. Their location, sprite, and DeadState are all correct. Am I forgetting to set something on these?