Randomize position and speed at runtime

When you add a sprite its position and speed (if any) are fixed and will be kept at runtime. It could be useful to randomize these values at runtime. As a result, sprite initial position, speed and direction will be different each time the screensaver starts.

 Randomize the initial position of the sprite

1. Select the sprite in the Screen Saver Document window.

2. Choose Project/Sprite Properties or Right click and choose Properties.

3. Click on the Size and Position tab.

4. In the Absolute Position group, click to choose the Random Position option. The two above values will be ignored at runtime and the sprite will be displayed anywhere on screen at each runtime.

 

 Randomize the speed and direction of the sprite

1. Select the sprite in the Screen Saver Document window.

2. Choose Project/Sprite Properties or Right Click and choose Properties.

3. Click on the Motion tab.

4. In the Speed group, click to choose the Randomize Speed option.

5. In the Horz and Vert fields, enter the random ranges. The initial random speed is calculated by a random number, between 0 and the value you specify (0-500), being added to or subtracted from the Initial Speed for horizontal and vertical respectively

Remarks