Contents Up Previous Next

ViewFrame functions and properties

Flipped property
Frame property (view frame)
Graphic property (view frame)
Loop property (view frame)
Sound property (view frame)
Speed property (view frame)
View property (view frame)


Flipped property

(Formerly part of GetGameParameter, which is now obsolete)

readonly bool ViewFrame.Flipped
Gets whether the frame was set to Flipped in the editor.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
if (frame.Flipped) {
  Display("This frame is flipped");
}
else {
  Display("This frame is not flipped");
}
See Also: Game.GetViewFrame, ViewFrame.Graphic


Frame property (view frame)

(Formerly part of GetGameParameter, which is now obsolete)

readonly int ViewFrame.Frame
Returns the frame number represented by this ViewFrame.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
Display("This ViewFrame is view %d, loop %d, frame %d",
  frame.View, frame.Loop, frame.Frame);
See Also: Game.GetViewFrame, ViewFrame.Loop, ViewFrame.View


Graphic property (view frame)

(Formerly part of GetGameParameter, which is now obsolete)

int ViewFrame.Graphic
Gets/sets the sprite slot number that this view frame displays.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
Display("This frame uses sprite %d", frame.Graphic);
See Also: Game.GetViewFrame


Loop property (view frame)

(Formerly part of GetGameParameter, which is now obsolete)

readonly int ViewFrame.Loop
Returns the loop number represented by this ViewFrame.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
Display("This ViewFrame is view %d, loop %d, frame %d",
  frame.View, frame.Loop, frame.Frame);
See Also: Game.GetViewFrame, ViewFrame.Frame, ViewFrame.View


Sound property (view frame)

(Formerly known as SetFrameSound, which is now obsolete)
(Formerly part of GetGameParameter, which is now obsolete)

int ViewFrame.Sound
Gets/sets the sound number of the sound that is linked to this frame. If there is no linked sound, this should be 0.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
Display("This frame has frame-linked sound %d.", frame.Sound);
See Also: Game.GetViewFrame


Speed property (view frame)

(Formerly part of GetGameParameter, which is now obsolete)

readonly int ViewFrame.Speed
Gets the speed setting of the view frame. This is 0 by default but may have been changed in the AGS Editor.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
Display("This frame has speed %d.", frame.Speed);
See Also: Game.GetViewFrame


View property (view frame)

(Formerly part of GetGameParameter, which is now obsolete)

readonly int ViewFrame.View
Returns the view number represented by this ViewFrame.

Example:

ViewFrame *frame = Game.GetViewFrame(WALKING, 2, 4);
Display("This ViewFrame is view %d, loop %d, frame %d",
  frame.View, frame.Loop, frame.Frame);
See Also: Game.GetViewFrame, ViewFrame.Loop, ViewFrame.Frame