- 1 Syntax and Initialization
- 2 FFC Properties
- 2.1 Properties
- 3 See Also
Syntax and Initialization
Declare a variable as type ffc as follows:
Until you initialze the variable, it does not actually "point to" any particular FFC, and thus any properties or methods you attempt to use will be invalid. You must initialize the variable by using the Screen->LoadFFC() method, as follows:
// Load the first FFC on the screen into a variable. AnFFC = Screen->LoadFFC(1);
It should be noted, however, that in an ffc script, the ffc that the script is attached to is already declared as 'this' by the compiler, and so can be used without declaration.
The syntax for accessing the properties associated with a ffc type variable is as follows:
where ffc-variable is a variable of type ffc and property is one of th properties listed below. For instance, the following snippet would set the horizontal velocity of the of the first FFC on the screen to 2.
// Create a ffc variable and set it // to the first FFC on the screen ffc AnFFC = Screen->LoadFFC(1);
// Set the horizontal velocity (Vx). AnFFC->Vx = 2;
As with any expression, you can use these properties as the evaluation criteria in control loops, if statements, and so forth.
The FFC's acceleration's X-component.
The FFC's acceleration's Y-component.
The cset of the FFC.
The number of the combo associated with this FFC.
The FFC's animation delay, in frames.
The height of the area of effect of the combo associated with the FFC, in pixels.
The width of the area of effect of the combo associated with the FFC, in pixels.
The FFC's set of flags. Use the FFCF_ constants in std.zh as the index to access a particular flag.
The original values of the FFC's 8 D input values as the are stored in the .qst file, ignoring any modification they may have received in ZScript.
The number of the FFC linked to by this FFC.
The number of tile rows composing the FFC.
The number of tile columns composing the FFC.
The number of the script assigned to the FFC. This will be automatically set to 0 when the FFC's script halts.
The FFC's velocity's X-component, in pixels per frame.
The FFC's velocity's Y-component, in pixels per frame.
The FFC's X position on the screen.
The FFC's Y position on the screen.