Freeform Combo

From ZCWiki
Jump to: navigation, search

A Freeform Combo is a combo that is capable of dynamic motion and having attached scripts. The Freeform Combo menu is accessible in ZQuest through Data->Freeform Combos.

Changers

A Changer is designed to modify the behaviour of other FFCs without having to use scripts. Use Changers to make FFCs move back and forth along a predefined area, and make FFCs change their Combos and CSets. Changers are normally invisible, but in ZQuest their locations are denoted by a single multicoloured pixel.

The X and Y values of FFC and Changer must be exactly equal during one frame of animation for a Changer to affect an FFC.

Data

The Data tab in the Edit Freeform Combo window.
Combo
This is the tile you wish to assign to the Freeform Combo. Even though only one tile is displayed, the combo itself can be made different sizes in the Combo W. and Combo H. fields.
Link to
This opens a menu from which to choose another Freeform Combo. Any movement of the former Freeform Combo is reflected in this "linked" Combo.
X Pos
This is the number of pixels from the left of the screen the Combo begins at. Recall that there are sixteen pixels per tile. Also note that if this value becomes smaller than -32 or larger than 288, it will either wrap around or be deactivated.
Y Pos
This is the number of pixels from the top of the screen the Combo begins at. Note that if this value becomes smaller than -32 or larger than 208, it will either wrap around or be deactivated.
X Speed
This is the initial velocity this Combo has parallel to the X-axis, in pixels per frame. Positive numbers will move the FFC to the right, while a negative number can be entered to make the Combo move leftward. Fractions may also be used. For example, entering an X Speed of 1 will make the Combo move to the right 1 pixel every frame. Entering an X Speed of 0.5 will make the Combo move to the right at 0.5 pixels per frame, which is converted to be 1 pixel every 2 frames (since you cannot have half of a pixel).
Y Speed
This is the initial velocity this Combo has parallel to the Y-axis, in pixels per frame. Positive numbers will move the FFC down, while a negative number can be entered to make the Combo move up. Fractions may also be used. For example, entering a Y Speed of 1 will make the Combo move down 1 pixel every frame. Entering a Y Speed of 0.5 will make the Combo move down at 0.5 pixels per frame, which is converted to be 1 pixel every 2 frames (since you cannot have half of a pixel).
X Accel
This is the Combo's rightward acceleration. A zero can be entered so that the Combo moves at a constant velocity, or a negative number can be entered so the Combo accelerates in the opposite direction.
Y Accel
This is the Combo's downward acceleration.
A. Delay
This is the delay, in frames, before the combo begins moving.
Combo W.
The Combo W. of a freeform combo denotes the width of the field of effect that the FFC's Combo Type attribute has, in pixels.
Combo H.
The Combo H. of a freeform combo denotes the height of the field of effect that the FFC's Combo Type attribute has, in pixels.
Tile W.
The Tile W. of a freeform combo denotes how large the width of the Freeform combo will be drawn. It will be drawn with tiles from the tile page, rather than the combo page. If a Freeform combo larger than 1 x 1 tiles is animated, it will need to use the combos 'A.SkipX' and 'A.SkipY' values to animate as desired.
Tile H.
The Tile H. of a freeform combo denotes how large the height of the Freeform combo will be drawn. It will be drawn with tiles from the tile page, rather than the combo page. If a Freeform combo larger than 1 x 1 tiles is animated, it will need to use the combos 'A.SkipX' and 'A.SkipY' values to animate as desired.
Script
Freeform Combo scripts (ZScript or ZASM) are set via this dropdown menu.

Flags

The Flags tab in the Edit Freeform Combo window.
Draw Over
When checked, this Freeform Combo is drawn over all layers
Translucent
When checked, this Freeform Combo becomes translucent, or partly visible.
Carry-Over
If the 'Carry-Over' flag is checked, when Link warps to a new screen the FFC will also be brought with him, along with any attached scripts.
Is a Changer (Invisible)
This Freeform Combo is a Changer. See the section on Changers for more information.
Stationary
This Freeform Combo doesn't move, even though it has speed and acceleration values. Best used on Changers.
Run Script at Screen Init
The Freeform Combo's script will begin running just before Link scrolls onto or appears on the screen. This can be used to "preprocess" a screen - changing and rearranging combos before the screen becomes visible to the player.
Only Visible to Lens of Truth
This Freeform Combo appears invisible unless viewed through the Lens of Truth when checked.
Script Restarts When Carried Over
Normally, if an FFC is carried over to another screen, its script execution state is also carried over. If this is checked, it will instead restart its script from the beginning once it is carried over.
Ethereal
If this flag is checked, the FFC's Combo Type and Inherent Combo Flag are ignored by Zelda Classic, and have no effect.

Flags (Changer specific)

Swap speed with next FFC
If an FFC of number N hits this Changer, its speed and acceleration values are swapped with the speed of FFC number N+1.
Swap speed with prev. FFC
If an FFC of number N hits this Changer, its speed and acceleration values swapped with the speed of FFC number N-1.
Increase combo ID
When a Freeform Combo hits this Changer, its Combo changes into the next combo in the list.
Decrease combo ID
When a Freeform Combo hits this Changer, its Combo changes into the previous combo in the list.
Change combo/cset to this
When a Freeform Combo hits this Changer, the Freeform Combo will take on the Changer's Combo and CSet attributes.

Carry Over

If the Screen Flag "FFCs Carry Over" is set, then the FFCs on the current screen will reappear and replace the similar-numbered FFC on the next screen Link visits. However, the following things prevent this:

  • Link was sent back to the start of the DMap by Whistle Whirlwind, Wizzrobe wind, or by a Wallmaster.

Arguments

The Arguments tab in the Edit Freeform Combo window.

These are used to give certain variables if a script is attached to the Freeform Combo. This allows for greater customisation of scripts, because the variables no longer need to be completely hard-coded into the script. The D variables are declared within the run() command of a ZScript FFC script. See compiling scripts and assigning scripts (ZScript) for additional details on using scripts with freeform combos.

An example: if an FFC's D0 value is equal to 12, and its D1 value is set to 0, and it has the following script attached:

ffc script One {
  void run(int arg, int arg2){
    // ...statements...
  }
}

...then the value of arg will be set to 12 when the script runs, whereas arg2 will be set to 0. Warning: changing D0 or D1 after the script has started to run will NOT change the values of arg or arg2!

The A variables are almost exclusively used by ZASM scripts.

See Also