Making a unit enter/leave the map

From Final Fantasy Hacktics Wiki
Revision as of 04:34, 23 April 2019 by Nyzer (talk | contribs) (Changed the format.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here's a quick, step-by-step guide to making a unit enter the map in a natural-looking manner.

For the purpose of this guide, we'll use Unit 01, walking south onto the edge of the map of Mandalia Plains at 001,012, down to 001,010, then moving slightly east to 003,010, before stopping and standing still.


1) Take a look at the map your event is taking place on.


You can find all the maps at http://ffhacktics.com/maps.php, and the EasyVent Editor Super Perfect 2.0 also has a Map Viewer option.

Once you know which tile your unit is walking onto the field from, look at other nearby tiles. It looks better if the initial walk-on effect keeps going for as long as possible - so if your unit is walking several tiles in, see if they can be put a few tiles further in. The easiest way to do this is to only do this along straight, level ground that's all at the same Height. So, for example, if the first three tiles in a straight line towards your unit's ultimate destination are all 3H, then you want put your unit 3 tiles in rather than right at the edge.


2) Place your unit at that tile in the ENTD.


If you're having trouble deciding between different locations while crafting the event, you can use WarpUnit instead until you get it locked down. Best to let them be set in the ENTD, though - you gain a little event space that way.

In this case, I would initially place Unit 01 at 001,010. For the purpose of this example, we'll say I used WarpUnit.

WarpUnit(x01,x00,001,010,x00,x00)


3) Before you reveal the map, Erase your unit.


Don't RemoveUnit unless you have to, as AddUnit requires extra wait time in between. Draw does not.

Erase(x01,x00)


4) ColorUnit so your unit is shadowed.


This effect still works even when the unit is Erased.

ColorUnit(x01,x00,x01,-006,-004,-002,000)


5) SpriteMove your unit into position.


Your character will need to be moved 28 pixels per tile, for every tile away from the one at the edge of the map. Then, once they've been Moved to the tile at the edge of the map (or if that's where they're walking in to), move them a further 12 pixels towards it. You won't make this move take any time, since this is just the setup.

SpriteMove(x01,x00,+00000,+00000,+00068,x00,x02,+00000)


6) When the time comes to make your unit walk in, Draw them...


Draw(x01,x00)


7) ... ColorUnit to slowly return them to their normal coloring...


ColorUnit(x01,x00,x04,-000,-000,-000,004)


8) ... and make them SpriteMove to their real position.


Use a time of about 00045 for every tile they cross at walking speed, plus an extra 00020 for those first 12 pixels at the edge.

SpriteMove(x01,x00,+00000,+00000,+00000,x00,x02,+00110)


9) Use WaitSpriteMove to prevent the event from progressing until they've moved into place.


WaitSpriteMove(x01,x00)


10) If you're planning on making the unit WalkTo a tile further into the map, set up that command now.


WalkTo(x01,x00,003,0100,x00,x00,+008,x01)


11) Same as with WaitSpriteMove, use WaitWalk to prevent the event from progressing until they've moved into place.


WaitWalk(x01,x00)


12) Once your unit is finished moving - whether with SpriteMove or WalkTo - use UnitAnim to set them to the normal standing animation (or whatever other animation/action you have planned).


UnitAnim(x01,x00,x0002,x00)