(AGK version: 108.15)
Submitted: 2013-07-09 17:01:38
Setvirtualresolution(640,480)
ResetTimer()
//Create a Red Cross Image
swap()
Drawline(0,0,15,15,255,0,0)
Update(0)
Render()
Drawline(0,15,15,0,255,0,0)
Update(0)
Render()
GetImage(1,0,0,15,15)
SetClearColor(50,50,100)
//Create Sprte
id=CreateSprite(1)

AddVirtualButton(1,580,420,80)
SetVirtualButtonText(1,"Clone")
Do
    If GetVirtualButtonPressed(1)
        id=CloneSprite(id)
        SetSpritePosition(id,Random(20,620),Random(20,460))
    EndIf
    If Timer()>15 Then Exit
    Sync()
Loop
End
(AGK version: 2019.09.27)
Submitted: 2019-11-27 06:54:45
SetVirtualResolution(800,600)

Sprite1 = CreateSprite(0) `create sprite with a blank, white image
	SetSpriteSize(Sprite1,64,64)

Sprite2 = CloneSprite(Sprite1)
	SetSpriteColor(Sprite2,255,0,0,255) `make the clone red
	SetSpritePosition(Sprite2,128,0)

do
	
	Sync()
loop
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.