PDA

View Full Version : Getting Link's Position in a FFC Script



C-Dawg
10-14-2006, 06:26 PM
According to the documentation, float X is the X position of an FFC, and int X is the X position of Link. How do you get the position of Link within a script attached to an FFC?

My goal is aquire Link's position so that the FFC can move relative to Link. If I can't get Link's position directly from an FFC script, how else can I do that?

EDIT: It does not appear that the method used to edit ZScript is obvious. I've looked at the FFC Scripts in Revolution Quest and the Technical Documentation, and I'm not making much sense of it. Clearly there are functions (or whatever) called by Revolution's FFC Scripts that are not documented in DarkDragon's thread. For instance, take this Code attached to a trap that follows Link horizontally:

WAITFRAME
COMPARER x,lx ; find Link
GOTOLESS 6; block him horizontally
SUBV x,1
GOTO 1
ADDV x,1
GOTO 1
QUIT

I don't see WAITFRAME, COMPARER, GOTOLESS, etc in the technical manual. It looks like assembly, but I'm not seeing any way for someone out of the loop to figure out how to program this.

Saffith
10-14-2006, 08:02 PM
There are two different languages: ZScript and ZASM. The latter was implemented one beta earlier, so it's all that's used in the oldest scripts.

The basics of ZScript are covered in this post (http://www.armageddongames.net/showpost.php?p=1090035&postcount=2). That's for an older beta, though. A couple of names have changed since then, and there are a few more keywords and operators (+= etc., break, continue, possibly a few more). The functions and variables are mostly covered in this post (http://www.armageddongames.net/showthread.php?t=93851); for the constants, look at std.zh.

Anyway, to get and set Link's position, use Link->X and Link->Y; for the FFC, use this->X and this->Y.