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

If you just want to have a new sprite with the same graphics as your old sprite, you should use CreateSprite() instead; it can create sprite links which are very memory-friendly, i.e. they consume very little memory and thus should be preferred to CopySprite() whenever possible.

Inputs
source
source sprite id
dest
id for the sprite to be created or Nil for auto ID select
Results
id
optional: identifier of the cloned sprite; will only be returned when you pass Nil as argument 2 (see above)

Show TOC