Attack Chain on Death

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Attack Chain on Death

Post by JSH357 »

Hey, this is an engine quirk that has kind of bugged me for a long time and I would love to see addressed. If it's already fixed, please let me know how to fix it, as I cannot figure it out for the life of me.

If you have an attack that chains to another, and the first attack kills the targeted enemy, the second attack will hit another enemy. This is fine sometimes, but most of the time I want to attack to NOT chain when it kills something. I've been staring at the bitsets and chaining properties a while and I see no way to accomplish this.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
NeoSpade
Slime Knight
Posts: 163
Joined: Thu Jun 10, 2010 5:52 pm
Location: North Wales (UK)
Contact:

Post by NeoSpade »

Here's a wild stab, have the main attack be an invisible attack that checks if the enemies HP is bellow a certain level, then use that for an Else chain that will only ever chain to the first part of the attack but not the second, of course this would take 4 attacks; the invisible one, the original chain attack, the second chain and then the first chain attack, without it's chain.
User avatar
msw188
Metal Slime
Posts: 783
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

Have the first attack in the chain store the target, and have the second attack set to target the stored target only. This 2nd attack should fail to execute if there are no living stored targets left.
I am Srime
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

That is clever.

But I do really need to add a built-in option to make chains stop when the target dies.
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

msw188 wrote:Have the first attack in the chain store the target, and have the second attack set to target the stored target only. This 2nd attack should fail to execute if there are no living stored targets left.
I would do this, but I use Store Target for other things, and I find that feature rather finnicky sometimes. :( It's probably the best solution though.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
msw188
Metal Slime
Posts: 783
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

I'm not sure if this would help, but if only one attack in the chain is causing HP damage, you could arrange it so that that is the final damage to be calculated. If this doesn't make sense for the attack, you could have the HP damaging attack be "display damage but do not inflict", and then move on to the other attacks, and then inflict the damage at the end. In this way the player will see all parts of the chain, and the enemy would die after the full chain has gone through. Would that be helpful? I'll admit I haven't thought through this one so carefully.
I am Srime
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

Yes, I could do the status effect first, but there's supposed to be a 15% chance of the effect happening and players EXPECT to see damage first, period.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
FnrrfYgmSchnish
Metal Slime
Posts: 721
Joined: Thu Jun 18, 2009 4:37 am
Location: Middle of Nowhere, VA

Post by FnrrfYgmSchnish »

If you have an attack that chains to another, and the first attack kills the targeted enemy, the second attack will hit another enemy. This is fine sometimes, but most of the time I want to attack to NOT chain when it kills something. I've been staring at the bitsets and chaining properties a while and I see no way to accomplish this.
Try setting the target of the second attack to "Previous Target" rather than "Enemy."

That way, the chained attacks just won't happen if the previous target is dead already, instead of switching over to another random enemy like the regular "Enemy" targeting does.
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

FnrrfYgmSchnish wrote:
If you have an attack that chains to another, and the first attack kills the targeted enemy, the second attack will hit another enemy. This is fine sometimes, but most of the time I want to attack to NOT chain when it kills something. I've been staring at the bitsets and chaining properties a while and I see no way to accomplish this.
Try setting the target of the second attack to "Previous Target" rather than "Enemy."

That way, the chained attacks just won't happen if the previous target is dead already, instead of switching over to another random enemy like the regular "Enemy" targeting does.
Does that actually work? I would assume if the previous target doesn't exist, it still attempts to attack and defaults to the first target.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

JSH357 wrote: Does that actually work? I would assume if the previous target doesn't exist, it still attempts to attack and defaults to the first target.
I just tested this, and it does work! :)
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

Oh, well awesome. That pretty much covers it, then. I'm not sure why that wasn't obvious to me.
My website, the home of Motrya:
http://www.jshgaming.com
Post Reply