I have a sprite with different frames and I want to create an instance of that sprite with a random frame at a random position and to create an invisible version of the same sprite with the same frame and at the same position.
How would you do it?
Develop games in your browser. Powerful, performant & highly capable.
local variable tempX local variable tempY local variable tempFrame Set tempX to random(0,1000) Set tempY to random(0,500) // create first sprite System create Sprite at (tempX, tempY) Set tempFrame to random(Sprite.AnimationFrameCount) Sprite set frame to tempFrame // create second sprite System create Sprite at (tempX, tempY) Sprite set frame to tempFrame Sprite set Visibility = invisible