He was killed here...then why is he over there?

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Spazman
Slime Knight
Posts: 241
Joined: Sun Jul 17, 2011 1:46 am
Location: Online, somewhere.
Contact:

He was killed here...then why is he over there?

Post by Spazman »

I'm trying to implement a corpse system into my game, but I want to have the enemy produce a corpse where it stands. I have most of in there, and when killed, the enemy spawns a corpse of itself on the ground...but in a completely different area from where it died?

is there something I could do to have the corpse be placed right where the enemy was shot down in the first place, instead of having random corpse spots?
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:

Re: He was killed here...then why is he over there?

Post by Bob the Hamster »

thespazztikone wrote:I'm trying to implement a corpse system into my game, but I want to have the enemy produce a corpse where it stands. I have most of in there, and when killed, the enemy spawns a corpse of itself on the ground...but in a completely different area from where it died?

is there something I could do to have the corpse be placed right where the enemy was shot down in the first place, instead of having random corpse spots?
Can you post the script that you are using to spawn the corpses?
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Pretty sure he means in battle.
User avatar
Shizuma
Slime Knight
Posts: 257
Joined: Mon Mar 10, 2008 11:11 am
Location: Toronto, ON

Post by Shizuma »

The enemy spawns the other enemy the instant it dies, so it spawns in the first available slot; with theirs not available.

So what do you do? For the meantime you have their death trigger a invisible enemy. This one will 99 speed and a suicide attack that spawns the corpse - because the initial enemy already is gone it'll put it in the first available slot (where they were).

Just beware it sometimes won't work when you have several enemies.
Last edited by Shizuma on Thu Sep 22, 2011 4:00 pm, edited 1 time in total.
User avatar
msw188
Metal Slime
Posts: 783
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

You can accomplish this by putting a blank-picture enemy in a different slot, but in the same placement as the old enemy. Then when the old enemy dies, he spawns an invisible super fast enemy with an attack that targets the specific slot of the blank-picture enemy to transmogrify it into the 'corpse'. This method necessitates two slots for each enemy, however (one for the enemy itself, one for its eventual corpse).
I am Srime
User avatar
Spazman
Slime Knight
Posts: 241
Joined: Sun Jul 17, 2011 1:46 am
Location: Online, somewhere.
Contact:

Post by Spazman »

thanks guise. I'll make sure I do what I can when i get home.
Hopefully this thing'll wurk. hopefully it works with multiple enemies!
User avatar
charbile
Metal Slime
Posts: 576
Joined: Tue Jun 21, 2011 6:18 am

Post by charbile »

Isn't there a way to fake it now with transmogrification? Wanted to imagine it's like changing the enemy graphic picture, so you don't have to worry about spawning slot trouble.

Either way, custom battle script guise!!
User avatar
KF Harlock
Slime Knight
Posts: 194
Joined: Wed Oct 22, 2008 10:45 am
Location: East Coast USA
Contact:

Post by KF Harlock »

For what it's worth, you can also control where a spawned enemy will appear simply by going to the next available slot, adding an enemy to it, moving it into the desired position, then making it blank again. For some reason, the OHR will "remember" the position you assigned to that slot - no need for blank/hidden enemies.
SPELLSHARD: THE BLACK CROWN OF HORGOTH now COMPLETE! <a href="http://www.slimesalad.com/forum/viewgam ... 4363">Grab it today!</a>
User avatar
shakeyair
Slime Knight
Posts: 215
Joined: Fri Jun 12, 2009 6:15 am

Post by shakeyair »

Harlock Hero wrote:For what it's worth, you can also control where a spawned enemy will appear simply by going to the next available slot, adding an enemy to it, moving it into the desired position, then making it blank again. For some reason, the OHR will "remember" the position you assigned to that slot - no need for blank/hidden enemies.
Except that will only work if the player kills the enemies in the correct order.

I think transmogrification would be the way to go, but that sucks because there is no 'transmogrify on death' or 'attack on death' (writing that out it seems really strange... is it true we don't have an 'attack on death' option??)

The solution for this is make it a desperation attack, but this sucks because 1. you cant have actual desperation attacks 2. the monster has to take a turn to die, which is awkward. With counters in, why don't we have a 'counter killing blow with..' option or something?

Another issue might be battle rewards, though. I'm not sure.
User avatar
msw188
Metal Slime
Posts: 783
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

Indeed we do not have any legitimate option for enemies to attack with their dying breath. I also reread my post on this, and I'm not sure I was clear.

-For any given enemy, there will have to be two different enemies defined, one for the living enemy and one for its corpse (obviously).

-There will also have to be a third enemy, untargetable, with no picture and no stats besides HP, that does nothing but sits and holds onto a slot in the battle formation. This slot is positioned in the same place as the living enemy, because this invisible statless enemy is going to be transmogrified into the corpse.

-There will also have to be a FOURTH enemy, with no picture, but with rediculously high speed and only one attack - the transmogrifying attack. This enemy does not start on the battlefield; the living enemy is set to spawn this fourth one when it dies. Then this fourth one has the transmogrifying attack, which is set up to ONLY TARGET THE SLOT THAT THE THIRD ENEMY ABOVE IS PLANNED TO OCCUPY. This transmogrifying attack also chains to an attack that kills off this fourth enemy.

So the chain of events will work like this:
-Beginning of battle, Living Enemy and Blank Enemy are both present, positioned on the same place on the battlefield (but are in different slots, naturally).
-Something kills Living Enemy, which spawns the FOURTH enemy above in whatever slot is available - this slot doesn't matter because the fourth enemy is invisible.
-The FOURTH enemy uses its transmogrifying attack on the Blank Enemy, changing it into the Corpse; it will be where the Living Enemy was onscreen, because the Blank Enemy had been positioned there since the start of the battle.
-The FOURTH enemy kills itself.

This setup will have to be essentially copied by hand for every single enemy that can have its corpse onscreen, in every formation. But I'm 95% sure it will be fulll-proof.
I am Srime
User avatar
charbile
Metal Slime
Posts: 576
Joined: Tue Jun 21, 2011 6:18 am

Post by charbile »

Hm. So you could only have at most 2 visible enemies at a time? Curious to see someone try it.
User avatar
shakeyair
Slime Knight
Posts: 215
Joined: Fri Jun 12, 2009 6:15 am

Post by shakeyair »

man, that seems like too much trouble. how about:

set enemy HP higher than it should be by some percentage
make enemy transmogrify itself to a corpse
have the corpse enemy set to 'win even if alive' or whatever

done!

not perfect, but simpler. make sure all enemy corpses are of type:corpse, and (i'm assuming you want to be able to bring them back to life during battle) they have a counterattack to a 'bring back to life' spell which transmogrifies them back into the enemy they originally were.

alternatively, we already have 'spawn on death' how hard can it possibly be to make 'attack on death?' i would appeal to james or TMC and see if its not something they could do pretty quickly. (sometimes, things that seem simple editor side are very complex behind the scenes, so it might not work out... but its worth a try, i think)
User avatar
Shizuma
Slime Knight
Posts: 257
Joined: Mon Mar 10, 2008 11:11 am
Location: Toronto, ON

Post by Shizuma »

Well it's a mess no matter what you do, we've listed all the methods. But the OHR wasn't made for it.
User avatar
msw188
Metal Slime
Posts: 783
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

So you could only have at most 2 visible enemies at a time?
Not true. The four enemies will be defined, but only two (the Living Enemy and the Blank Enemy) will be placed in the battle formation. The Fourth Enemy is created via spawning when the Living Enemy dies. The Corpse Enemy is created via transmogrification. So you could only have 4 enemies on screen at any time, which is unfortunate but not terrible, it seems to me.
set enemy HP higher than it should be by some percentage
make enemy transmogrify itself to a corpse
have the corpse enemy set to 'win even if alive' or whatever
This idea is rife with problems, that aren't even necessarily very rare. The main issue is that the enemy in question needs to have its turn come up to be able to transmogrify itself. This means that from the time that the player deals the damage needed to 'kill' the enemy (even though it is technically still alive), there is a chance that the enemy will be targetted again and REALLY killed before it gets a chance to transmogrify itself.

The issue compounds if the heroes have access to instant death attacks. Then there are other issues; attacks that cut HP in half, say, will all have to be recalculated. Then again, these %-based issues are probably resolvable, but I don't think the issue of being outright killed is.
alternatively, we already have 'spawn on death' how hard can it possibly be to make 'attack on death?' i would appeal to james or TMC and see if its not something they could do pretty quickly. (sometimes, things that seem simple editor side are very complex behind the scenes, so it might not work out... but its worth a try, i think)
This would be great, although it might make for some awkward decisions to make. Like, what if the dying enemy is the final enemy? Should its attack get run? What if it has a delay assigned to it? Does it wait to die until its attack is finished, or does it die first then the attack runs? If it waits, can it target itself? Can other characters target it? Just some things to consider if this is implemented.
I am Srime
Post Reply