Only because no one will make it or even reply to the thread.
Well, I was going to reply to it, but only to say 'No, I don't want to use it in my quest', so I thought it probably wasn't worth getting your hopes up...
Anyway.
Yah, you'll have to script enemies for that one.
Or just hide Link underneath the boat.
Which is probably much simpler.
Code:
void DrawTile(int layer, int x, int y, int tile, int blockw, int blockh, int cset, float scale, int rx, int ry, int rangle, int flip, bool transparency, int opacity)
Draws a block of tiles on the specified layer of the current screen, starting at (x,y), using the specified cset. Starting with the specified tile, this method copies a block of size blockh x blockw from the tile sheet to the screen. This method's behavior is undefined unless 1 <= blockh, blockw <= 20. The scaling and rotation parameters are reserved for the future, and not currently implemented. This method's behavior is undefined unless rx=ry=rangle=0 and scale=1. Flip specifies how the tiles should be flipped when drawn: 0: No flip 1: Vertical flip 2: Horizontal flip 3: Both (180 degree rotation) If transparency is true, the tiles' transparent regions will be respected. Opacity controls how transparent the solid portions of the tiles will be. Values other than 128 (solid) and 64 (translucent) are currently undefined.
An example would be:
Code:
Screen->DrawTile(layer, Xcoord, Ycoord, Startingtile, Blockwidth, Blockheight, Cset, 1, 0, 0, 0, 0, true, 128);
Make sure to capitalise the 'T' in 'Tile', otherwise it won't compile.
How do you make things happen when an ffc touches Link or another ffc?
To do this, you have to check distances between things.
You draw a pseudo square (as in, you don't see it, but the script 'sees' it) around one of the objects, then check whether the other object is within that square.
The easiest way to do this is to use the 'Abs' function.
'Abs' (or 'absolute') takes a number, and returns only a positive value for it, so if the num ber is a negative number, it will turn it into a positive number.
So what you'd do is:
In an 'if' command, subtract Link's X coordinate from the ffc's X coordinate.
This returns a value of distance, but it isn't very useful at the moment, due to the fact that it might be below 0.
So you return the Abs value for it, then check if that is less than that distance you want to know between the two.
Then repeat, for the Y coordinate.
Like this:
Code:
if(Abs(Link->X - this->X) < 20) && Abs(Link->Y - this->Y < 20)){
//do whatever
)