This post was from rpgmaker net by Kazesui-
Easy way of doing this:
Make a footprint event like this:
Code:
Branch if hero face up
this event face up
Branch if hero face right
this event face right
...
change event location, this event (Var0001, Var0002)
Now you can copy an arbitrarily large amount of these events without making any changes to the code.
Have an Auto start event like this:
Code:
Variable Ev Ptr = 4 (value corresponding to first ID of your footprints, 4 just an example)
Variable Ev Page = 1
Erase Event
After the auto start event has executed, let a parallel process run with code like this
Code:
Variable x = hero x
Variable y = hero y
Branch if x is not equal to old_x
Variable old_x = x
Ev Ptr sub 3 (the value of start ID minus one)
Ev Ptr mod 13 (the value of end ID minus start ID plus one. end id = 16 here)
Ev Ptr add 4 (same value as start ID)
Wait 0.1 (assuming move speed = 4)
Call event (Ev Ptr, Ev Page)
Branch if y is not equal to old_y
...repeat...
This will make footprints last as long as you stay on the map, and as long as you don't make too many steps. If you spend too many steps, the last footprints will disappear and appear as new ones instead. Only bad thing about it is that you'll need a lot of events, but there's no real way around that with conventional event coding anyway.
To make the footprints not visible before used, I'd recommend having an inaccessible tile on the map, with the graphic covering the entire tile above hero, and with a simple loop, change the location of all the foot print events to this tile with help of the call event command.