PDA

View Full Version : Link's Animation



pkmnfrk
03-31-2009, 10:20 PM
Forward: I have no idea whatsoever what the code that animates Link looks like, so I have no idea how feasible this is. However, it bears asking.

I think it would be very cool if a new variable was added to the Link object that overrides his animation. If it were up to me, it would work something like this:

- By default, it would be equal to ANIM_AUTO or something, which means that he animates according to his current action: Swimming, Jumping, Walking, Picking His Nose, etc.

- But, we could override it by setting it to ANIM_WALKING (for example) so that, until further notice, he appears to be walking. Whether or not he's moving is irrelevant.

- Taking this idea one step further, I would love to have some custom animations that we could script to whatever we want. It wouldn't be that farfetched to script, say, Link hiking up his pants if the player doesn't do anything for 15 seconds. Or, a cutscene where Link is sleeping.

- I've tried to simulate this with Tile Modifications, but that serves an entirely different purpose. To achieve the level of control I am suggesting, you would need (poses * shields * other modifications) copies of Link's graphics, which is pointless and wasteful.

I'm not really expecting this to go anywhere (pre-2.5), but I'm just throwing it out there.

CJC
04-01-2009, 08:13 PM
Yeah, being able to directly manipulate Link's animation with a script would be INCREDIBLY helpful. Up to this point, I've been working his artwork when using custom items (Like dash boots or a shield) by adding an invisible "anima" item to the inventory when the items are removes, which shifts his sprites to the appropriate set for the actions that can be taken with that item.

But of course, the "anima" has to be set up perfectly to work properly, and you have to meticulously remove them when activating another item with special animation. In other words, the more special animation you have, the more garbage you have to throw into the script to avoid letting the separate anima items cumulatively throw your animation out of the range you've so carefully constructed (Not to mention eat up dozens and dozens of precious tile pages, or even more if you're using 2x2 sprites).

I think I'll go on the wiki and see if there's anything remotely related to this, that doesn't involve hiding Link and using "Drawtile()"

EDIT: Nope, there's nothing about Link's animation in the script functions involving him. I guess the only way to do it right now is with item tile mods.


[CJC7988->April Fools Protection Box. The text doens't lie, but my username might]

EDIT EDIT:
Experiment with setting Link->Action. It may help a little.

You could set his action and then control him manually with scripting... might make things a little easier on your tiles.
I dunno, the animation might actually be hardcoded into the action... we won't know until they release the source code with 2.5 (Which I believe they said they would).



const int LA_NONE = 0;
const int LA_WALKING = 1;
const int LA_ATTACKING = 2;
const int LA_FROZEN = 3;
const int LA_HOLD1LAND = 4; // One hand.
const int LA_HOLD2LAND = 5; // Both hands.
const int LA_RAFTING = 6;
const int LA_GOTHURTLAND = 7;
const int LA_INWIND = 8;
const int LA_SCROLLING = 9;
const int LA_WINNING = 10;
const int LA_SWIMMING = 11;
const int LA_HOPPING = 12; // Leaving water.
const int LA_GOTHURTWATER = 13;
const int LA_HOLD1WATER = 14;
const int LA_HOLD2WATER = 15;
const int LA_CASTING = 16;
const int LA_CAVEWALKUP = 17;
const int LA_CAVEWALKDOWN = 18;
const int LA_DYING = 19;
const int LA_DROWNING = 20;
const int LA_CHARGING = 22; // Charging the sword.
const int LA_SPINNING = 23; // Spin attack.
const int LA_DIVING = 24;