Complex animation workarounds

There are a couple of things I would like to try and do with animations that don't seem to be possible with the standard commands. I was hoping someone might be able to give some advice on how these might be accomplished.

Is it possible to have part of the player sprite (like an arm or leg) be displayed in front of an enemy and the rest of the player behind the enemy? An example might be doing a knee after a grab (the knee should appear over the enemy but the player will be partially blocked by the enemy's body) or a groin punch (where one of the enemy's legs would be in front of the player's arm).

Is there any way to set multiple bounding boxes on an enemy so that they can react differently depending on where attacks hit them? I thought maybe you could overlay multiple versions of the same enemy and have them all track the original's movements, but then I wouldn't know how to hide all the copies and only have the animation of the 'hit' one play.

I'm not concerned with memory optimization, just possible methods. Thank you very much for any suggestions.
 
However, the spawn is appearing behind the enemy, which kind of negates the whole point of this

Yes, this red colored parameter

@cmd spawnBind "Arm" 100 100 1 1 4

It defines Arm's position in relative to spawner in z axis. Modify this value until you get desired result
OR move enemy to the back and adjust his/her offset

could you also explain in a little more detail why your "Arm" example uses "4" at the end to require the same animation as the original?

Sure :)

Code:
bindentity(entity, target, int x, int z, int a, int direction, int bindanimation)
~Bind entity to target, so the target moves, the entity moves.
~x, z, a: relative to target.
~direction: 0 no change 1 same direction as target -1 opposite direction as target 2 always right -2 always left
~bindanimation: 0 No effect. 1 Keep same animation as the target. 2 Also keep same frame as the target. 4 Kill the entity if the animation doesn't match.
~To unbind a entity, use bindentity(entity, NULL());
~Notice: You can combine those values for bindanimation, so it can be 6 which means 2 and 4.

The last parameter of spawnBind is the same last parameter of bindentity
 
I'd tried adjusting the z of the spawned body part, but it just moved it down and out of position (which was expected). Can you use setlevel on this sort of spawned entity?  (nvm, you can)

Thanks for the explanation of the script, I will look at that more carefully. Much appreciated.
 
Back
Top Bottom