ViewFrame functions and properties

From AGS wiki

Jump to: navigation, search
This article is an entry in the AGS Manual.
Please do not edit this entry except to wikify it, or keep it up-to-date with the manual or current AGS version. Instead you can discuss this article here.
This page was last modified 14 November 2006, and could be out of date with the current AGS version. If you see a page is out of date, please update it!

Owning entry: Scripting

 

Contents

ViewFrame.Flipped

(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

ViewFrame.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

ViewFrame.Graphic

(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

ViewFrame.Loop

(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

ViewFrame.Sound

(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

ViewFrame.Speed

(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

ViewFrame.View

(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

Personal tools
Advertisement