Name
CopyBGPic -- clone a background picture (V4.0)
Synopsis
[id] = CopyBGPic(source, dest)
Function
This function clones the background picture specified by source and creates a copy of it as background picture dest. If you specify Nil in the dest argument, this function will choose an identifier for this background picture automatically and return it to you. The new background picture is independent from the old one so you could free the source background picture after it has been cloned.

Please note that only the plain graphics data of the background picture will be cloned. CopyBGPic() will not clone any layers, sprites, or buttons attached to the background picture.

Inputs
source
source background picture id
dest
identifier of the new BGPic or Nil for auto id select
Results
id
optional: identifier of the BGPic; will only be returned when you pass Nil as argument 2 (see above)
Example
CopyBGPic(1, 10)
FreeBGPic(1)
The above code creates a new background picture 10 which contains the same graphics data as background picture 1. Then it frees background picture 1 because it is no longer needed.

Show TOC