User Guide
Chapter 364
addOverlay
Syntax
sprite(whichSprite).camera{(index)}.addOverlay(texture, \
locWithinSprite, rotation)
member(whichCastmember).camera(whichCamera).addOverlay(texture, \
locWithinSprite, rotation)
Description
3D camera command; adds an overlay to the end of the camera’s list of overlays. The overlay is
displayed in the 3D sprite at
locWithinSprite with the indicated rotation. The
locWithinSprite parameter is a 2D loc measured from the upper left corner of the sprite.
Examples
The first line of this statement creates a texture named Rough from the cast member named
Cedar and stores it in the variable t1. The second line applies the texture as an overlay at the point
(220, 220) within sprite 5. The texture has a rotation of 0 degrees. The last line of the statement
applies the same texture as an overlay for camera 1 of the cast member named Scene at the point
(20, 20). The texture has a rotation of 45 degrees.
t1 = member("Scene").newTexture("Rough", #fromCastMember,\
member("Cedar"))
sprite(5).camera.addOverlay(t1, point(220, 220), 0)
member("Scene").camera[1].addOverlay(t1, point(20, 20), 45)
See also
removeOverlay
addProp
Syntax
list.addProp(property, value)
addProp list, property, value
Description
Property list command; for property lists only, adds the property specified by property and its
value specified by value to the property list specified by list. For an unsorted list, the value is
added to the end of the list. For a sorted list, the value is placed in its proper order.
If the property already exists in the list, Lingo creates a duplicate property. You can avoid
duplicate properties by using the
setaProp command to change the new entry’s property.
This command returns an error when used with a linear list.
Examples
This statement adds the property named kayne and its assigned value 3 to the property list
named
bids, which contains [#gee: 4, #ohasi: 1]. Because the list is sorted, the new entry is
placed in alphabetical order:
bids.addProp(#kayne, 3)
The result is the list [#gee: 4, #kayne: 3, #ohasi: 1].
This statement adds the entry
kayne: 7 to the list named bids, which now contains [#gee: 4,
#kayne: 3, #ohasi: 1]. Because the list already contains the property
kayne, Lingo creates a
duplicate property:
bids.addProp(#kayne, 7)
The result is the list [#gee: 4, #kayne: 3, #kayne: 7, #ohasi: 1].