Functions: |
lt_sysset(enabled,view,ambient,addative,shadows,reset,autodraw,depth)
This controls the general settings for the lighting system. You can enable system,
limit it to a specified view, turn addative lighting on and off, enable/disable shadows
and even reset the entire system of lights. Reset will delete all current lights,
useful when switching rooms. autodraw will cause the lights to be drawn automatically,
providing simplicity at the cost of a little speed. depth will adjust the depth at
which the lights are drawn when using autodraw. If you do not wish to use autodraw,
you can leave the last two arguments empty.
|
lt_refresh()
When autodraw is turned off, you will need to manually update the system. This function
will update the light and shadow positions. This function should never be used in the draw
event, as it can cause unexpected behavior with the viewports.
|
lt_redraw()
When autodraw is turned off, you will need to manually update the system. This function
will draw the lights onto the screen.
|
lt_lightadd(sprite,sub,x,y,xscale,yscale,rot,color,enabled,castshadow)
This function creates a new lights and returns it's id number that can be used for later
functions. enabled turns the light on or off. castshadow will tell the light
whether to cast shadows or not. If shadows are turned off in the system, this argument is
pointless.
|
lt_lightdelete(id)
Deletes the specified light. This cannot be undone.
|
lt_lightset(id,sprite,sub,x,y,xscale,yscale,rot,color,enable,castshadow)
This function will modify an existing light. See lt_lightadd for more details.
|
lt_lightset_x(id,x)
Sets the x position of the specified light.
|
lt_lightset_y(id,y)
Sets the y position of the specified light.
|
lt_lightset_on(id)
Turns the specified light on or off. |
lt_lightset_castsshadows(id)
Toggles the light's ability to cast shadows. If shadows are turned off in the system
this function will have no effect.
|
lt_lightexists(id)
This function returns whether the specified light exists or not.
|
lt_lightget_x(id)
Returns the x position of the specified light.
|
lt_lightget_y(id)
returns the y position of the specified light.
|
lt_lightget_on(id)
Returns whether the specified light is on or not.
|
lt_lightget_castsshadows(id)
Returns if a light can cast shadows. If shadows are turned off in the system
this function may return an incorrect value.
|
lt_lightcount()
Returns the total number of lights that exist in that room. This takes into account
lights that are currently turned off or out of view as well.
|
lt_shadcreate()
Creates a new empty shadow shape and returns it's id. Since the new system in version 7.0
this function enables multiple shadows to be defined at once.
|
lt_shadbegin(id)
Starts defining (initializes) points for an empty shadow shape.
|
lt_shadreset(id)
Clears the points of the specified shadow shape and re-initializes the defining process.
This is useful for morphing and/or rotating shadows.
|
lt_shadpoint(x,y,z)
Adds a point to an initialized shadow shape. Points should be placed in a clockwise or
count-clockwise pattern around the shape. Points are placed relative to the object as well.
The z value acts differently than the x< and y values, in that it is
measured by the distance from the given light. So a light with a radius of 128, at a value
of 1 the shadow's max length will be 128 pixels for that light.
|
lt_shadend()
Tells the system you are finished defining points for a shadow shape.
|
lt_shadobj(objectid,shadowid,spritemask,sub,xscale,yscale,rot)
This attaches a shadow shape to an object as well as a shape mask. Multiple shadows can be given
to the same object with multiple calls to this function. The shape mask is defined with the rest
of these functions, and usually should be the same as the object's image. The shape mask acts as a
border that shadows can't pass, keeping the object above shadows. This function returns the pairing
id of the two shapes.
|
lt_shadsetobj(id,objectid,shadowid,spritemask,sub,xscale,yscale,rot)
Modifies the values of a specified pairing. See lt_shadobj() for more info about this function.
Currently there is no method of deleting pairings.
|