Class Actor

Basic Actor class

Methods

Actor:AddWrapperState () This adds a wrapper state around the Actor, which is like wrapping the Actor in an ActorFrame, except that you can use it on any actor, and add or remove wrapper states in response to things that happen while the screen is being used.
Actor:GetNumWrapperStates () Returns the number of wrapper states the actor has.
Actor:GetWrapperState (i) Returns the wrapper state at index i.
Actor:RemoveWrapperState (int, i) Removes the wrapper state at index i.
Actor:GetParent () Returns the Actor's parent, or nil if it doesn't have one.
Actor:GetFakeParent () Returns the Actor's fake parent, or nil if it doesn't have one.
Actor:SetFakeParent (Actor, p) Sets the Actor's fake parent to p, or clears it if p is nil.
Actor:GetVisible () Returns the Actor's visibility.
Actor:GetX () Returns the Actor's x position.
Actor:GetY () Returns the Actor's y position.
Actor:GetZ () Returns the Actor's z position.
Actor:GetDestX () Returns what the Actor's x position will be when it reaches its destination tween state.
Actor:GetDestY () Returns what the Actor's y position will be when it reaches its destination tween state.
Actor:GetDestZ () Returns what the Actor's z position will be when it reaches its destination tween state.
Actor:GetZoom () Returns the Actor's zoom.
Actor:GetZoomX () Returns the Actor's X zoom.
Actor:GetZoomY () Returns the Actor's Y zoom.
Actor:GetZoomZ () Returns the Actor's Z zoom.
Actor:SetTextureFiltering (bool, b) Sets Texture Filtering for an Actor to b.
Actor:accelerate (float, fRate) Plays the commands that follow at an accelerated rate (fRate * fRate), where fRate is in seconds.
Actor:addcommand (string, sName, ActorCommand, cmd) Adds a command to the Actor.
Actor:addrotationx (float, rot) Adds rot to the Actor's current x rotation.
Actor:addrotationy (float, rot) Adds rot to the Actor's current y rotation.
Actor:addrotationz (float, rot) Adds rot to the Actor's current z rotation.
Actor:addx (float, xPos) Adds xPos to the Actor's current x position.
Actor:addy (float, yPos) Adds yPos to the Actor's current y position.
Actor:addz (float, zPos) Adds zPos to the Actor's current z position.
Actor:align (h, v) Sets the alignment of an Actor, where h and v are in the range 0..1.
Actor:animate (bool, b) Sets whether or not the Actor should animate.
Actor:aux (float, fAux) Sets the Actor's aux value.
Actor:backfacecull (bool, b) If true, cull the Actor's back faces.
Actor:basealpha (float, fAlpha) Sets the Actor's base alpha to fAlpha, where fAlpha is in the range 0..1.
Actor:baserotationx (float, rot) Sets the Actor's base X rotation to rot.
Actor:baserotationy (float, rot) Sets the Actor's base Y rotation to rot.
Actor:baserotationz (float, rot) Sets the Actor's base Z rotation to rot.
Actor:basezoom (float, zoom) Sets the Actor's base zoom to zoom.
Actor:basezoomx (float, zoom) Sets the Actor's base X zoom to zoom.
Actor:basezoomy (float, zoom) Sets the Actor's base Y zoom to zoom.
Actor:basezoomz (float, zoom) Sets the Actor's base Z zoom to zoom.
Actor:blend (BlendMode, mode) Sets the Actor to use the specified blend mode.
Actor:bob () Makes the Actor bob up and down.
Actor:bounce () Makes the Actor bounce, similar to bob but with one point acting as the ground.
Actor:Center (time) Centers an Actor on the screen.
Actor:CenterX (time) Centers an Actor on the X axis.
Actor:CenterY (time) Centers an Actor on the y axis.
Actor:clearzbuffer (bool, bClear) Determines if the z-buffer should be cleared or not.
Actor:compound (length, tweens) Combines multiple interpolators for complex tweens.
Actor:cropbottom (float, percent) Crops percent of the Actor from the bottom, where percent is in the range 0..1.
Actor:cropleft (float, percent) Crops percent of the Actor from the left, where percent is in the range 0..1.
Actor:cropright (float, percent) Crops percent of the Actor from the right, where percent is in the range 0..1.
Actor:croptop (float, percent) Crops percent of the Actor from the top, where percent is in the range 0..1.
Actor:cullmode (CullMode, mode) Sets the Actor's cull mode to mode.
Actor:decelerate (float, fRate) Plays the commands that follow at an decelerated rate (1 - (1-fRate) * (1-fRate)), where fRate is in seconds.
Actor:diffuse (color, c) Set the Actor's diffuse color to c.
Actor:diffusealpha (float, fAlpha) Sets the Actor's alpha level to fAlpha, where fAlpha is in the range 0..1.
Actor:diffuseblink () Makes the Actor switch between two colors immediately.
Actor:diffusebottomedge () Sets the Actor's bottom edge color to c.
Actor:diffusecolor (color, c) Set the Actor's diffuse color to c, ignoring any alpha value in c.
Actor:diffuseleftedge (color, c) Sets the Actor's left edge color to c.
Actor:diffuselowerleft (color, c) Sets the Actor's lower left corner color to c.
Actor:diffuselowerright (color, c) Sets the Actor's lower right corner color to c.
Actor:diffuseramp () Makes the Actor switch between two colors, jumping back to the first after reaching the second.
Actor:diffuserightedge (color, c) Sets the Actor's right edge color to c.
Actor:diffuseshift () Makes the Actor shift between two colors smoothly.
Actor:diffusetopedge (color, c) Sets the Actor's top edge color to c.
Actor:diffuseupperleft (color, c) Sets the Actor's upper left corner color to c.
Actor:diffuseupperright (color, c) Sets the Actor's upper right corner color to c.
Actor:Draw () Tells the Actor to draw itself.
Actor:draworder (int, iOrder) Sets the Actor's draworder to iOrder, where larger values display first.
Actor:drop (time) Set the Actor's effect clock to s.
Actor:ease (time, ease) Set the Actor's effect clock to s.
Actor:effectclock (string, s) Set the Actor's effect clock to s.
Actor:effectcolor1 (color, c) Sets the first effect color to c.
Actor:effectcolor2 (color, c) Sets the second effect color to c.
Actor:effectmagnitude (float, fX, float, fY, float, fZ) Set the Actor's effect magnitude in each direction to the given values.
Actor:effectoffset (float, fTime) Set the Actor's effect offset to fTime.
Actor:effectperiod (float, fTime) Set the Actor's effect period to fTime.
Actor:effecttiming (float, ramp_to_half, float, hold_at_half, float, ramp_to_full, float, hold_at_zero, float, hold_at_full)

Set the Actor's effect timing.

    hold_at_zero is before hold_at_full in the argument list for compatibility.
Actor:effect_hold_at_full (float, hold_at_full) Set the holdatfull part of the effect timing while leaving the others unchanged.
Actor:fadebottom (float, percent) Fades percent of the Actor from the bottom where percent is in the range 0..1.
Actor:fadeleft (float, percent) Fades percent of the Actor from the left where percent is in the range 0..1.
Actor:faderight (float, percent) Fades percent of the Actor from the right where percent is in the range 0..1.
Actor:fadetop (float, percent) Fades percent of the Actor from the top where percent is in the range 0..1.
Actor:finishtweening () Finishes up an Actor's tween immediately.
Actor:FullScreen () Stretches an Actor to fill the entire screen.
Actor:getaux () Returns the Actor's aux value.
Actor:GetBaseZoomX () Returns the Actor's base X zoom value.
Actor:GetBaseZoomY () Returns the Actor's base Y zoom value.
Actor:GetBaseZoomZ () Returns the Actor's base Z zoom value.
Actor:GetCommand (string, sCmdName) Returns true if the Actor has a command named sCmdName.
Actor:GetDiffuse () Returns the Actor's current diffuse color.
Actor:GetDiffuseAlpha () Returns the Actor's current diffusealpha.
Actor:GetEffectDelta () Returns the Actor's current effect delta.
Actor:geteffectmagnitude () Returns the Actor's current effect magnitude as three floats (not one; I hate Lua.xsd).
Actor:GetGlow () Returns the Actor's current glow color.
Actor:GetHAlign () Returns the Actor's horizontal alignment as a number in the range 0..1.
Actor:GetName () Returns the Actor's name.
Actor:GetNumStates () Returns the number of states the Actor has.
Actor:GetHeight () Returns the Actor's current height.
Actor:GetRotationX () Returns the Actor's current X rotation.
Actor:GetRotationY () Returns the Actor's current Y rotation.
Actor:GetRotationZ () Returns the Actor's current Z rotation.
Actor:GetSecsIntoEffect () Returns the number of seconds into the currently running effect (e.g.
Actor:GetTweenTimeLeft () Returns how much time is remaining for the current tween.
Actor:GetVAlign () Returns the Actor's vertical alignment as a number in the range 0..1.
Actor:GetWidth () Returns the Actor's current width.
Actor:GetZoomedHeight () Returns the zoomed height of an Actor.
Actor:GetZoomedWidth () Returns the zoomed width of an Actor.
Actor:get_tween_uses_effect_delta () Returns true if this actor is currently set to use the effect delta for tweening.
Actor:glow (color, c) Sets the Actor's glow color.
Actor:glowblink () Makes the Actor glow between two colors immediately.
Actor:glowramp () Makes the Actor glow between two colors smoothly, jumping back to the first at the end.
Actor:glowshift () Makes the Actor glow between two colors smoothly.
Actor:halign (float, fAlign) Set the fractional horizontal alignment of the Actor according to fAlign which should be a float in the range 0..1.
Actor:heading (float, fHeading) Sets the heading of this Actor to fHeading.
Actor:hibernate (float, fTime) Hides the Actor for the specified amount of time.
Actor:hidden (b) Compatibility alias for the hidden command, which was removed in sm-ssc.
Actor:hide_if (b) Compatibility alias for the hidden command, which was removed in sm-ssc.
Actor:horizalign (HorizAlign, align) Set the horizontal alignment of the Actor according to align.
Actor:hurrytweening (float, factor) Hurries up an Actor's tweening by factor.
Actor:linear (float, fRate) Plays the commands that follow at a normal rate, where fRate is in seconds.
Actor:linear (side) Plays the lyric command for the specified side ("Back" or "Front").
Actor:name (string, sName) Sets the Actor's name to sName.
Actor:pause () Stops the Actor's movement.
Actor:pitch (float, fPitch) Sets the pitch of this Actor to fPitch.
Actor:play () Starts the Actor's movement.
Actor:playcommand (string, sCommandName, table, params) Plays a command named sCommandName.
Actor:playcommand (playerNumber) Sets the visibility of the Actor based on p being a human player.
Actor:pulse () Makes the Actor grow and shrink.
Actor:queuecommand (string, sCommandName) Queues a command named sCommandName to be played.
Actor:queuemessage (string, sMessageName) Basically creates a command named !sMessageName (Note the ! at the beginning.
Actor:rainbow () Makes the Actor change colors continually using colors of the rainbow.
Actor:roll (float, fRoll) Sets the roll of this Actor to fRoll.
Actor:rotationx (float, fRotation) Set the Actor's rotation on the X axis to fAlign.
Actor:rotationy (float, fRotation) Set the Actor's rotation on the Y axis to fAlign.
Actor:rotationz (float, fRotation) Set the Actor's rotation on the Z axis to fAlign.
Actor:rotationz (float, fRotation) Set the Actor's rotation on the Z axis to fAlign.
Actor:rotationz (float, fRotation) Set the Actor's rotation on the Z axis to fAlign.
Actor:scale_or_crop_alternative (float, fRotation) An alternative version of scale_or_crop_background
Actor:scale_or_crop_background (float, fRotation)
Actor:scaletocover (float, fLeft, float, fTop, float, fRight, float, fBottom) Scales the Actor to cover a rectangle defined by the four float arguments.
Actor:scaletofit (float, fLeft, float, fTop, float, fRight, float, fBottom) Scales the Actor to fit inside a rectangle defined by the four float arguments.
Actor:SetHeight (float, height) Sets the height of the Actor.
Actor:setsize (width, height) Sets the size of the Actor.
Actor:SetSize (width, height) Alias for setsize.
Actor:setstate (int, iNewState) Sets a multi-framed Actor's state to iNewState.
Actor:SetWidth (float, width) Sets the width of the Actor.
Actor:set_tween_uses_effect_delta (bool) Use this to make the actor use the effect clock to tween instead of using the global frame delta.
Actor:shadowcolor (color, c) Sets the shadow's color to c.
Actor:shadowlength (float, fLength) Sets the Actor's shadow length to fLength.
Actor:shadowlengthx (float, fLength) Sets the Actor's horizontal shadow length to fLength.
Actor:shadowlengthy (float, fLength) Sets the Actor's vertical shadow length to fLength.
Actor:skewx (float, fAmount) Skews the Actor on the x axis by fAmount.
Actor:skewy (float, fAmount) Skews the Actor on the y axis by fAmount.
Actor:sleep (float, fSeconds) Waits fSeconds before executing the next command.
Actor:smooth (time)
Actor:spin () Tells the Actor to spin.
Actor:stopeffect () Stops any effect the Actor has.
Actor:stoptweening () Stops any tweening.
Actor:stretchto (float, x1, float, y1, float, x2, float, y2) Stretches the Actor to a rectangle of a specific size.
Actor:texturetranslate (float, x, float, y) Translates the texture of the actor by x and y.
Actor:texturewrapping (bool, bWrap) Determines if the Actor should use texture wrapping or not.
Actor:tween (time, tweentype, params) Uses type to determine the tween to use.
Actor:valign (float, fAlign) Set the fractional vertical alignment of the Actor according to fAlign which should be a float in the range 0..1.
Actor:vertalign (VertAlign, align) Set the vertical alignment of the Actor according to align.
Actor:vibrate () Makes the Actor vibrate violently.
Actor:visible (bool, b) Sets an Actor's visibility to b.
Actor:wag () Makes the Actor wag.
Actor:x (float, xPos) Set the x position of the Actor to xPos.
Actor:y (float, yPos) Set the y position of the Actor to yPos.
Actor:z (float, zPos) Set the z position of the Actor to zPos.
Actor:zbias (float, fBias) Sets the z bias to fBias.
Actor:zbuffer (bool, bUse) Enables/disables z-buffer depending on bUse.
Actor:zoom (float, zoom) Zooms the Actor to zoom scale.
Actor:zoomto (float, zoomX, float, zoomY) Zooms the Actor on both the X and Y axis using zoomX and zoomY.
Actor:zoomtoheight (float, zoom) Zooms the Actor to zoom height.
Actor:zoomtowidth (float, zoom) Zooms the Actor to zoom width.
Actor:zoomx (float, zoom) Zooms the Actor to zoom scale on the X axis.
Actor:zoomy (float, zoom) Zooms the Actor to zoom scale on the Y axis.
Actor:zoomz (float, zoom) Zooms the Actor to zoom scale on the Z axis.
Actor:ztest (bool, bTest) Sets the z testing mode to write on pass if true, turns it off if false
Actor:ztestmode (ZTestMode, testMode) Sets the z testing mode to testMode.
Actor:zwrite (bool, bWrite) Sets z writing to true or false based on bWrite.
Actor:bezier (time, curve) Plays the commands that follow using a bezier curve to determine the rate.
Actor:FullScreen () Stretches an Actor to cover the screen.
Actor:MaskDest () Sets and Actor as a mask destination.
Actor:MaskSource () Sets an Actor as a mask source.
Actor:Real (f) Make graphics their true size at any resolution.
Actor:RealInverse (f) Scale things back up after they have already been scaled down.
Actor:thump (fEffectPeriod) A customized version of pulse that is more appealing for on-beat effects.
Actor:xy (float, actorX, float, actorY) Sets the x and y location of the Actor in one command.


Methods

Actor:AddWrapperState ()

This adds a wrapper state around the Actor, which is like wrapping the Actor in an ActorFrame, except that you can use it on any actor, and add or remove wrapper states in response to things that happen while the screen is being used. (wrapping an Actor in an ActorFrame normally requires setting it up before the screen starts)

    The ActorFrame that is returned is the wrapper state, for convenience.<br />
    An Actor can have any number of wrapper states.  Use GetWrapperState to access wrapper states for the actor.

Returns:

    ActorFrame
Actor:GetNumWrapperStates ()
Returns the number of wrapper states the actor has.

Returns:

    ActorFrame
Actor:GetWrapperState (i)
Returns the wrapper state at index i. Think of wrapper states with a higher index as being "further out". Actor is inside Wrapper 1, Wrapper 1 is inside Wrapper 2, Wrapper 2 is inside Wrapper 3, and so on.

Parameters:

  • i

Returns:

    ActorFrame
Actor:RemoveWrapperState (int, i)
Removes the wrapper state at index i.

Parameters:

  • int
  • i

Returns:

Actor:GetParent ()
Returns the Actor's parent, or nil if it doesn't have one.

Returns:

    Actor
Actor:GetFakeParent ()
Returns the Actor's fake parent, or nil if it doesn't have one.

Returns:

    Actor
Actor:SetFakeParent (Actor, p)
Sets the Actor's fake parent to p, or clears it if p is nil.

Parameters:

  • Actor
  • p

Returns:

Actor:GetVisible ()
Returns the Actor's visibility.

Returns:

    bool
Actor:GetX ()
Returns the Actor's x position.

Returns:

    float
Actor:GetY ()
Returns the Actor's y position.

Returns:

    float
Actor:GetZ ()
Returns the Actor's z position.

Returns:

    float
Actor:GetDestX ()
Returns what the Actor's x position will be when it reaches its destination tween state.

Returns:

    float
Actor:GetDestY ()
Returns what the Actor's y position will be when it reaches its destination tween state.

Returns:

    float
Actor:GetDestZ ()
Returns what the Actor's z position will be when it reaches its destination tween state.

Returns:

    float
Actor:GetZoom ()
Returns the Actor's zoom.

Returns:

    float
Actor:GetZoomX ()
Returns the Actor's X zoom.

Returns:

    float
Actor:GetZoomY ()
Returns the Actor's Y zoom.

Returns:

    float
Actor:GetZoomZ ()
Returns the Actor's Z zoom.

Returns:

    float
Actor:SetTextureFiltering (bool, b)
Sets Texture Filtering for an Actor to b.

Parameters:

  • bool
  • b

Returns:

    void
Actor:accelerate (float, fRate)
Plays the commands that follow at an accelerated rate (fRate * fRate), where fRate is in seconds.

Parameters:

  • float
  • fRate

Returns:

    void
Actor:addcommand (string, sName, ActorCommand, cmd)
Adds a command to the Actor.

Parameters:

  • string
  • sName
  • ActorCommand
  • cmd

Returns:

    void
Actor:addrotationx (float, rot)
Adds rot to the Actor's current x rotation.

Parameters:

  • float
  • rot

Returns:

    void
Actor:addrotationy (float, rot)
Adds rot to the Actor's current y rotation.

Parameters:

  • float
  • rot

Returns:

    void
Actor:addrotationz (float, rot)
Adds rot to the Actor's current z rotation.

Parameters:

  • float
  • rot

Returns:

    void
Actor:addx (float, xPos)
Adds xPos to the Actor's current x position.

Parameters:

  • float
  • xPos

Returns:

    void
Actor:addy (float, yPos)
Adds yPos to the Actor's current y position.

Parameters:

  • float
  • yPos

Returns:

    void
Actor:addz (float, zPos)
Adds zPos to the Actor's current z position.

Parameters:

  • float
  • zPos

Returns:

    void
Actor:align (h, v)
Sets the alignment of an Actor, where h and v are in the range 0..1.

Parameters:

  • h
  • v

Returns:

    void
Actor:animate (bool, b)
Sets whether or not the Actor should animate.

Parameters:

  • bool
  • b

Returns:

    void
Actor:aux (float, fAux)
Sets the Actor's aux value. (This can be a solution for coupling data with an Actor.)

Parameters:

  • float
  • fAux

Returns:

    void
Actor:backfacecull (bool, b)
If true, cull the Actor's back faces. See also: .

Parameters:

  • bool
  • b

Returns:

    void
Actor:basealpha (float, fAlpha)
Sets the Actor's base alpha to fAlpha, where fAlpha is in the range 0..1.

Parameters:

  • float
  • fAlpha

Returns:

    void
Actor:baserotationx (float, rot)
Sets the Actor's base X rotation to rot.

Parameters:

  • float
  • rot

Returns:

    void
Actor:baserotationy (float, rot)
Sets the Actor's base Y rotation to rot.

Parameters:

  • float
  • rot

Returns:

    void
Actor:baserotationz (float, rot)
Sets the Actor's base Z rotation to rot.

Parameters:

  • float
  • rot

Returns:

    void
Actor:basezoom (float, zoom)
Sets the Actor's base zoom to zoom.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:basezoomx (float, zoom)
Sets the Actor's base X zoom to zoom.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:basezoomy (float, zoom)
Sets the Actor's base Y zoom to zoom.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:basezoomz (float, zoom)
Sets the Actor's base Z zoom to zoom.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:blend (BlendMode, mode)
Sets the Actor to use the specified blend mode.

Parameters:

  • BlendMode
  • mode

Returns:

    void
Actor:bob ()
Makes the Actor bob up and down. Can use to define different bobbing behavior.

Returns:

    void
Actor:bounce ()
Makes the Actor bounce, similar to bob but with one point acting as the ground. Can use to define different bouncing behavior (with effectmagnitude values relating to x, y, and z movement).

Returns:

    void
Actor:Center (time)
Centers an Actor on the screen. (equivalent to x,SCREENCENTERX;y,SCREENCENTERY)

Parameters:

  • time
Actor:CenterX (time)
Centers an Actor on the X axis. (equivalent to x,SCREENCENTERX)

Parameters:

  • time
Actor:CenterY (time)
Centers an Actor on the y axis. (equivalent to y,SCREENCENTERY)

Parameters:

  • time
Actor:clearzbuffer (bool, bClear)
Determines if the z-buffer should be cleared or not.

Parameters:

  • bool
  • bClear

Returns:

    void
Actor:compound (length, tweens)

Combines multiple interpolators for complex tweens. tweens

    can either be a string like <code>"linear,0.25,accelerate,0.75"</code> or
    a table with tween information <code>{ {Type="linear", Percent=0.25, Bezier=nil}, {Type="accelerate", Percent=0.75, Bezier=nil} }</code>

Parameters:

Returns:

    void
Actor:cropbottom (float, percent)
Crops percent of the Actor from the bottom, where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:cropleft (float, percent)
Crops percent of the Actor from the left, where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:cropright (float, percent)
Crops percent of the Actor from the right, where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:croptop (float, percent)
Crops percent of the Actor from the top, where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:cullmode (CullMode, mode)
Sets the Actor's cull mode to mode.

Parameters:

  • CullMode
  • mode

Returns:

    void
Actor:decelerate (float, fRate)
Plays the commands that follow at an decelerated rate (1 - (1-fRate) * (1-fRate)), where fRate is in seconds.

Parameters:

  • float
  • fRate

Returns:

    void
Actor:diffuse (color, c)
Set the Actor's diffuse color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffusealpha (float, fAlpha)
Sets the Actor's alpha level to fAlpha, where fAlpha is in the range 0..1.

Parameters:

  • float
  • fAlpha

Returns:

    void
Actor:diffuseblink ()
Makes the Actor switch between two colors immediately. See Themerdocs/effect_colors.txt for an example.

Returns:

    void
Actor:diffusebottomedge ()
Sets the Actor's bottom edge color to c.

Returns:

    void
Actor:diffusecolor (color, c)
Set the Actor's diffuse color to c, ignoring any alpha value in c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuseleftedge (color, c)
Sets the Actor's left edge color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuselowerleft (color, c)
Sets the Actor's lower left corner color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuselowerright (color, c)
Sets the Actor's lower right corner color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuseramp ()
Makes the Actor switch between two colors, jumping back to the first after reaching the second. See Themerdocs/effect_colors.txt for an example.

Returns:

    void
Actor:diffuserightedge (color, c)
Sets the Actor's right edge color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuseshift ()
Makes the Actor shift between two colors smoothly. See Themerdocs/effect_colors.txt for an example.

Returns:

    void
Actor:diffusetopedge (color, c)
Sets the Actor's top edge color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuseupperleft (color, c)
Sets the Actor's upper left corner color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:diffuseupperright (color, c)
Sets the Actor's upper right corner color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:Draw ()
Tells the Actor to draw itself.

Returns:

    void
Actor:draworder (int, iOrder)
Sets the Actor's draworder to iOrder, where larger values display first.

Parameters:

  • int
  • iOrder

Returns:

    void
Actor:drop (time)
Set the Actor's effect clock to s.

Parameters:

  • time

Returns:

    void
Actor:ease (time, ease)
Set the Actor's effect clock to s.

Parameters:

  • time
  • ease

Returns:

    void
Actor:effectclock (string, s)
Set the Actor's effect clock to s.

Parameters:

  • string
  • s

Returns:

    void
Actor:effectcolor1 (color, c)
Sets the first effect color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:effectcolor2 (color, c)
Sets the second effect color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:effectmagnitude (float, fX, float, fY, float, fZ)
Set the Actor's effect magnitude in each direction to the given values.

Parameters:

  • float
  • fX
  • float
  • fY
  • float
  • fZ

Returns:

    void
Actor:effectoffset (float, fTime)
Set the Actor's effect offset to fTime. The offset is added to the time into the effect before calculating percentthrougheffect.

Parameters:

  • float
  • fTime

Returns:

    void
Actor:effectperiod (float, fTime)
Set the Actor's effect period to fTime.

Parameters:

  • float
  • fTime

Returns:

    void
Actor:effecttiming (float, ramp_to_half, float, hold_at_half, float, ramp_to_full, float, hold_at_zero, float, hold_at_full)

Set the Actor's effect timing.

    hold_at_zero is before hold_at_full in the argument list for compatibility.   A future version will probably swap them because it makes more sense to have hold_at_full come before hold_at_zero.<br />
    All effect timings must be greater than or equal to zero, at least one of them must be greater than zero.<br />
    The effect timing controls how long it takes an effect to cycle and how long it spends in each phase.<br />
    Depending on the effect clock, the actor's time into effect is updated every frame.  That time is then translated into a percent_through_effect using the parameters to this function.<br />
    <br />
    ramp_to_half is the amount of time for percent_through_effect to reach 0.5.<br />
    hold_at_half is the amount of time percent_through_effect will stay at 0.5.<br />
    ramp_to_full is the amount of time percent_through_effect will take to go from 0.5 to 1.0.<br />
    hold_at_full is the amount of time percent_through_effect will stay at 1.0.<br />
    After reaching the end of hold_at_full, percent_through_effect stays at 0 until hold_at_zero is over.<br />
    <br />
    The different effects use percent_through_effect in different ways.  Some use it to calculate percent_between_colors with this sine wave:  sin((percent_through_effect + 0.25f) * 2 * PI ) / 2 + 0.5f<br />
    Some effects check the internal bool blink_on.  blink_on is true if percent_through_effect is greater than 0.5 and false if percent_through_effect is less than or equal to 0.5.<br />
    Check the effect functions for individual explanations:  diffuseblink, diffuseshift, glowblink, glowshift, glowramp, rainbow, wag, bounce, bob, pulse, spin, vibrate.

Parameters:

  • float
  • ramp_to_half
  • float
  • hold_at_half
  • float
  • ramp_to_full
  • float
  • hold_at_zero
  • float
  • hold_at_full

Returns:

    void
Actor:effect_hold_at_full (float, hold_at_full)
Set the holdatfull part of the effect timing while leaving the others unchanged.

Parameters:

  • float
  • hold_at_full

Returns:

    void
Actor:fadebottom (float, percent)
Fades percent of the Actor from the bottom where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:fadeleft (float, percent)
Fades percent of the Actor from the left where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:faderight (float, percent)
Fades percent of the Actor from the right where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:fadetop (float, percent)
Fades percent of the Actor from the top where percent is in the range 0..1.

Parameters:

  • float
  • percent

Returns:

    void
Actor:finishtweening ()
Finishes up an Actor's tween immediately.

Returns:

    void
Actor:FullScreen ()
Stretches an Actor to fill the entire screen.

Returns:

    void
Actor:getaux ()
Returns the Actor's aux value.

Returns:

    float
Actor:GetBaseZoomX ()
Returns the Actor's base X zoom value.

Returns:

    float
Actor:GetBaseZoomY ()
Returns the Actor's base Y zoom value.

Returns:

    float
Actor:GetBaseZoomZ ()
Returns the Actor's base Z zoom value.

Returns:

    float
Actor:GetCommand (string, sCmdName)
Returns true if the Actor has a command named sCmdName.

Parameters:

  • string
  • sCmdName

Returns:

    bool
Actor:GetDiffuse ()
Returns the Actor's current diffuse color.

Returns:

    color
Actor:GetDiffuseAlpha ()
Returns the Actor's current diffusealpha.

Returns:

    float
Actor:GetEffectDelta ()
Returns the Actor's current effect delta.

Returns:

    float
Actor:geteffectmagnitude ()
Returns the Actor's current effect magnitude as three floats (not one; I hate Lua.xsd).

Returns:

    float
Actor:GetGlow ()
Returns the Actor's current glow color.

Returns:

    color
Actor:GetHAlign ()
Returns the Actor's horizontal alignment as a number in the range 0..1.

Returns:

    float
Actor:GetName ()
Returns the Actor's name.

Returns:

    string
Actor:GetNumStates ()
Returns the number of states the Actor has.

Returns:

    int
Actor:GetHeight ()
Returns the Actor's current height.

Returns:

    float
Actor:GetRotationX ()
Returns the Actor's current X rotation.

Returns:

    float
Actor:GetRotationY ()
Returns the Actor's current Y rotation.

Returns:

    float
Actor:GetRotationZ ()
Returns the Actor's current Z rotation.

Returns:

    float
Actor:GetSecsIntoEffect ()
Returns the number of seconds into the currently running effect (e.g. diffuseshift, bob).

Returns:

    float
Actor:GetTweenTimeLeft ()
Returns how much time is remaining for the current tween.

Returns:

    float
Actor:GetVAlign ()
Returns the Actor's vertical alignment as a number in the range 0..1.

Returns:

    float
Actor:GetWidth ()
Returns the Actor's current width.

Returns:

    float
Actor:GetZoomedHeight ()
Returns the zoomed height of an Actor.

Returns:

    float
Actor:GetZoomedWidth ()
Returns the zoomed width of an Actor.

Returns:

    float
Actor:get_tween_uses_effect_delta ()
Returns true if this actor is currently set to use the effect delta for tweening.

Returns:

    bool
Actor:glow (color, c)
Sets the Actor's glow color.

Parameters:

  • color
  • c

Returns:

    void
Actor:glowblink ()
Makes the Actor glow between two colors immediately. See Themerdocs/effect_colors.txt for an example.

Returns:

    void
Actor:glowramp ()
Makes the Actor glow between two colors smoothly, jumping back to the first at the end. See Themerdocs/effect_colors.txt for an example.

Returns:

    void
Actor:glowshift ()
Makes the Actor glow between two colors smoothly. See Themerdocs/effect_colors.txt for an example.

Returns:

    void
Actor:halign (float, fAlign)
Set the fractional horizontal alignment of the Actor according to fAlign which should be a float in the range 0..1. An alignment of 0 is left aligned while an alignment of 1 is right aligned. See for the common case.

Parameters:

  • float
  • fAlign

Returns:

    void
Actor:heading (float, fHeading)
Sets the heading of this Actor to fHeading.

Parameters:

  • float
  • fHeading

Returns:

    void
Actor:hibernate (float, fTime)
Hides the Actor for the specified amount of time.

Parameters:

  • float
  • fTime

Returns:

    void
Actor:hidden (b)
Compatibility alias for the hidden command, which was removed in sm-ssc. Use instead.

Parameters:

  • b boolean

Returns:

    void
Actor:hide_if (b)
Compatibility alias for the hidden command, which was removed in sm-ssc. Use visible instead.

Parameters:

  • b boolean

Returns:

    void
Actor:horizalign (HorizAlign, align)
Set the horizontal alignment of the Actor according to align. See for fractional alignment.

Parameters:

  • HorizAlign
  • align

Returns:

    void
Actor:hurrytweening (float, factor)
Hurries up an Actor's tweening by factor.

Parameters:

  • float
  • factor

Returns:

    void
Actor:linear (float, fRate)
Plays the commands that follow at a normal rate, where fRate is in seconds.

Parameters:

  • float
  • fRate

Returns:

    void
Actor:linear (side)
Plays the lyric command for the specified side ("Back" or "Front").

Parameters:

Returns:

    void
Actor:name (string, sName)
Sets the Actor's name to sName.

Parameters:

  • string
  • sName

Returns:

    void
Actor:pause ()
Stops the Actor's movement. (Usually used for Sprites or Models.)

Returns:

    void
Actor:pitch (float, fPitch)
Sets the pitch of this Actor to fPitch.

Parameters:

  • float
  • fPitch

Returns:

    void
Actor:play ()
Starts the Actor's movement. (Usually used for Sprites or Models.)

Returns:

    void
Actor:playcommand (string, sCommandName, table, params)
Plays a command named sCommandName. params is passed to the command as an argument if it is a table.

Parameters:

  • string
  • sCommandName
  • table
  • params

Returns:

    void
Actor:playcommand (playerNumber)
Sets the visibility of the Actor based on p being a human player.

Parameters:

  • playerNumber

Returns:

    void
Actor:pulse ()
Makes the Actor grow and shrink. Can use to define different pulsing behavior.

Returns:

    void
Actor:queuecommand (string, sCommandName)
Queues a command named sCommandName to be played.

Parameters:

  • string
  • sCommandName

Returns:

    void
Actor:queuemessage (string, sMessageName)
Basically creates a command named !sMessageName (Note the ! at the beginning. The source code says this: "Hack: use "!" as a marker to broadcast a command, instead of playing a command, so we don't have to add yet another element to every tween state for this rarely-used command.")

Parameters:

  • string
  • sMessageName

Returns:

    void
Actor:rainbow ()
Makes the Actor change colors continually using colors of the rainbow. Each channel follows a cosine wave, red starts at 0, green starts at 2pi/3, and blue starts at 4pi/3.

Returns:

    void
Actor:roll (float, fRoll)
Sets the roll of this Actor to fRoll.

Parameters:

  • float
  • fRoll

Returns:

    void
Actor:rotationx (float, fRotation)
Set the Actor's rotation on the X axis to fAlign.

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:rotationy (float, fRotation)
Set the Actor's rotation on the Y axis to fAlign.

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:rotationz (float, fRotation)
Set the Actor's rotation on the Z axis to fAlign.

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:rotationz (float, fRotation)
Set the Actor's rotation on the Z axis to fAlign.

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:rotationz (float, fRotation)
Set the Actor's rotation on the Z axis to fAlign.

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:scale_or_crop_alternative (float, fRotation)
An alternative version of scale_or_crop_background

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:scale_or_crop_background (float, fRotation)

Parameters:

  • float
  • fRotation

Returns:

    void
Actor:scaletocover (float, fLeft, float, fTop, float, fRight, float, fBottom)
Scales the Actor to cover a rectangle defined by the four float arguments.

Parameters:

  • float
  • fLeft
  • float
  • fTop
  • float
  • fRight
  • float
  • fBottom

Returns:

    void
Actor:scaletofit (float, fLeft, float, fTop, float, fRight, float, fBottom)
Scales the Actor to fit inside a rectangle defined by the four float arguments.

Parameters:

  • float
  • fLeft
  • float
  • fTop
  • float
  • fRight
  • float
  • fBottom

Returns:

    void
Actor:SetHeight (float, height)
Sets the height of the Actor.

Parameters:

  • float
  • height

Returns:

    void
Actor:setsize (width, height)
Sets the size of the Actor.

Parameters:

  • width
  • height

Returns:

    void
Actor:SetSize (width, height)
Alias for setsize.

Parameters:

  • width
  • height

Returns:

    void
Actor:setstate (int, iNewState)
Sets a multi-framed Actor's state to iNewState.

Parameters:

  • int
  • iNewState

Returns:

    void
Actor:SetWidth (float, width)
Sets the width of the Actor.

Parameters:

  • float
  • width

Returns:

    void
Actor:set_tween_uses_effect_delta (bool)
Use this to make the actor use the effect clock to tween instead of using the global frame delta.

Parameters:

  • bool

Returns:

Actor:shadowcolor (color, c)
Sets the shadow's color to c.

Parameters:

  • color
  • c

Returns:

    void
Actor:shadowlength (float, fLength)
Sets the Actor's shadow length to fLength.

Parameters:

  • float
  • fLength

Returns:

    void
Actor:shadowlengthx (float, fLength)
Sets the Actor's horizontal shadow length to fLength.

Parameters:

  • float
  • fLength

Returns:

    void
Actor:shadowlengthy (float, fLength)
Sets the Actor's vertical shadow length to fLength.

Parameters:

  • float
  • fLength

Returns:

    void
Actor:skewx (float, fAmount)
Skews the Actor on the x axis by fAmount.

Parameters:

  • float
  • fAmount

Returns:

    void
Actor:skewy (float, fAmount)
Skews the Actor on the y axis by fAmount.

Parameters:

  • float
  • fAmount

Returns:

    void
Actor:sleep (float, fSeconds)
Waits fSeconds before executing the next command.

Parameters:

  • float
  • fSeconds

Returns:

    void
Actor:smooth (time)

Parameters:

  • time

Returns:

    void
Actor:spin ()
Tells the Actor to spin. Can use to define different spinning behavior.

Returns:

    void
Actor:stopeffect ()
Stops any effect the Actor has.

Returns:

    void
Actor:stoptweening ()
Stops any tweening.

Returns:

    void
Actor:stretchto (float, x1, float, y1, float, x2, float, y2)
Stretches the Actor to a rectangle of a specific size.

Parameters:

  • float
  • x1
  • float
  • y1
  • float
  • x2
  • float
  • y2

Returns:

    void
Actor:texturetranslate (float, x, float, y)
Translates the texture of the actor by x and y.

Parameters:

  • float
  • x
  • float
  • y

Returns:

    void
Actor:texturewrapping (bool, bWrap)
Determines if the Actor should use texture wrapping or not.

Parameters:

  • bool
  • bWrap

Returns:

    void
Actor:tween (time, tweentype, params)

Uses type to determine the tween to use. The type must be one of the TweenType enum values. If the type is note TweenTypeBezier, the params table is ignored. If the type is TweenTypeBezier, then the params table must have 4 or 8 numbers. 4 numbers in the params creates a 1 dimensional bezier curve, 8 numbers creates a 2 dimensional bezier curve.

    It's usually more convenient to use Actor:linear, Actor:accelerate, and so on, rather than using Actor:tween directly.

Parameters:

  • time
  • tweentype
  • params

Returns:

    void
Actor:valign (float, fAlign)
Set the fractional vertical alignment of the Actor according to fAlign which should be a float in the range 0..1. An alignment of 0 is top aligned while an alignment of 1 is bottom aligned. See for the common case.

Parameters:

  • float
  • fAlign

Returns:

    void
Actor:vertalign (VertAlign, align)
Set the vertical alignment of the Actor according to align. See for fractional alignment.

Parameters:

  • VertAlign
  • align

Returns:

    void
Actor:vibrate ()
Makes the Actor vibrate violently. Can use to define different vibration behavior.

Returns:

    void
Actor:visible (bool, b)
Sets an Actor's visibility to b.

Parameters:

  • bool
  • b

Returns:

    void
Actor:wag ()
Makes the Actor wag. Use to define different wag behavior.

Returns:

    void
Actor:x (float, xPos)
Set the x position of the Actor to xPos.

Parameters:

  • float
  • xPos

Returns:

    void
Actor:y (float, yPos)
Set the y position of the Actor to yPos.

Parameters:

  • float
  • yPos

Returns:

    void
Actor:z (float, zPos)
Set the z position of the Actor to zPos.

Parameters:

  • float
  • zPos

Returns:

    void
Actor:zbias (float, fBias)
Sets the z bias to fBias.

Parameters:

  • float
  • fBias

Returns:

    void
Actor:zbuffer (bool, bUse)
Enables/disables z-buffer depending on bUse.

Parameters:

  • bool
  • bUse

Returns:

    void
Actor:zoom (float, zoom)
Zooms the Actor to zoom scale.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:zoomto (float, zoomX, float, zoomY)
Zooms the Actor on both the X and Y axis using zoomX and zoomY.

Parameters:

  • float
  • zoomX
  • float
  • zoomY

Returns:

    void
Actor:zoomtoheight (float, zoom)
Zooms the Actor to zoom height. See also: .

Parameters:

  • float
  • zoom

Returns:

    void
Actor:zoomtowidth (float, zoom)
Zooms the Actor to zoom width. See also: .

Parameters:

  • float
  • zoom

Returns:

    void
Actor:zoomx (float, zoom)
Zooms the Actor to zoom scale on the X axis.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:zoomy (float, zoom)
Zooms the Actor to zoom scale on the Y axis.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:zoomz (float, zoom)
Zooms the Actor to zoom scale on the Z axis.

Parameters:

  • float
  • zoom

Returns:

    void
Actor:ztest (bool, bTest)
Sets the z testing mode to write on pass if true, turns it off if false

Parameters:

  • bool
  • bTest

Returns:

    void
Actor:ztestmode (ZTestMode, testMode)
Sets the z testing mode to testMode.

Parameters:

  • ZTestMode
  • testMode

Returns:

    void
Actor:zwrite (bool, bWrite)
Sets z writing to true or false based on bWrite.

Parameters:

  • bool
  • bWrite

Returns:

    void
Actor:bezier (time, curve)
Plays the commands that follow using a bezier curve to determine the rate. The curve must have 4 or 8 elements. This is a convenience wrapper around calling Actor:tween with TweenType_Bezier.

Parameters:

  • time
  • curve

Returns:

    void
Actor:FullScreen ()
Stretches an Actor to cover the screen. (equivalent to stretchto,0,0,SCREENWIDTH,SCREENHEIGHT)

Returns:

    void
Actor:MaskDest ()
Sets and Actor as a mask destination.

Returns:

    void
Actor:MaskSource ()
Sets an Actor as a mask source. (Also clears zbuffer; other mask sources need to not clear the zbuffer)

Returns:

    void
Actor:Real (f)
Make graphics their true size at any resolution.

Parameters:

  • f

Returns:

    void
Actor:RealInverse (f)
Scale things back up after they have already been scaled down.

Parameters:

  • f

Returns:

    void
Actor:thump (fEffectPeriod)
A customized version of pulse that is more appealing for on-beat effects.

Parameters:

  • fEffectPeriod

Returns:

    void
Actor:xy (float, actorX, float, actorY)
Sets the x and y location of the Actor in one command.

Parameters:

  • float
  • actorX
  • float
  • actorY

Returns:

    void
generated by LDoc 1.4.6 Last updated 2023-01-15 03:25:11