PDA

View Full Version : Funny things with NPC / Link -> ScriptTile



Bagu
02-27-2024, 08:48 AM
....





Well, I always found it a lil annoying to create TileModifiers (and complete dedicated TilePages) for any custom Link animation.
...also I found it hillarious to hide the Engine Sprite (Link->Invisible) and use Dummies (FFC/LWeapon etc) for Custom Animations....

And to handle everything by Link->ScriptTile (and scripted AFrames, ASpeed (animation Clk)) is unecessery effort.

A very simple way to add flexible ScriptTile animations, and bypass those settings, if unwanted (and use regular engine animation)
is to have an additional variable (I also call it ScriptTile) within a dedicated Animation Namespace. (Lets call it CustomAnimation)






Having a line like the one below in your active global or hero script allows flexibility.

if(CustomAnimation::ScriptTile == 0){Link->ScriptTile = Link->Tile;} else{Link->ScriptTile = CustomAnimation::ScriptTile;}



Finally you can assign Tile values to CustomAnimation::ScriptTile as you will, and assign Zero, to bypass ScriptTile features.
...you can also add arrays of various CustomTiles (size 4), (within the Namespace) to draw depending on Link->Dir.

Example (wanna have a "Kicking" Tile ???):
CustomAnimation::ScriptTile = CustomAnimation::CustomTile_Kick[Link->Dir];

.

All that is also working fine, with NPC animations....


I hope my english is good enough to explain what I mean.

I was happy that I found out, this lil' trick.

Bagu
03-01-2024, 01:19 PM
I guess, I'll load up a few brief example scripts, soon.