Class Actor
Basic Actor class
This class inherits no methods from superclasses.
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.
|
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
), wherefRate
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
andv
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
, wherefAlpha
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:
- length number
- tweens string
Returns:
-
void
- actor:cropbottom (float, percent)
-
Crops
percent
of the Actor from the bottom, wherepercent
is in the range 0..1.Parameters:
- float
- percent
Returns:
-
void
- actor:cropleft (float, percent)
-
Crops
percent
of the Actor from the left, wherepercent
is in the range 0..1.Parameters:
- float
- percent
Returns:
-
void
- actor:cropright (float, percent)
-
Crops
percent
of the Actor from the right, wherepercent
is in the range 0..1.Parameters:
- float
- percent
Returns:
-
void
- actor:croptop (float, percent)
-
Crops
percent
of the Actor from the top, wherepercent
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
)), wherefRate
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
, wherefAlpha
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 inc
.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 wherepercent
is in the range 0..1.Parameters:
- float
- percent
Returns:
-
void
- actor:fadeleft (float, percent)
-
Fades
percent
of the Actor from the left wherepercent
is in the range 0..1.Parameters:
- float
- percent
Returns:
-
void
- actor:faderight (float, percent)
-
Fades
percent
of the Actor from the right wherepercent
is in the range 0..1.Parameters:
- float
- percent
Returns:
-
void
- actor:fadetop (float, percent)
-
Fades
percent
of the Actor from the top wherepercent
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 namedsCmdName
.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:
- side string
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
andzoomY
.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 iffalse
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
orfalse
based onbWrite
.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