## setScale

### Syntax:

    setScale (horizon, divide);

### Purpose:

Changes the scaling for characters. The horizon value represents the level (y co-ordinate) of the horizon on the screen. The divide parameter is how quickly characters grow and shrink as they move towards or away from the horizon. The scale at which a character is drawn is calculated using the algorithm scale = (y position - horizon) / divide.

If the divide value is 0, no scaling will be applied to characters when they move; each character will continue to be drawn at the size in which it was previously drawn. In this situation, new characters added using addCharacter will be created with a scale value of 1.

Changing the scale does not affect characters which aren't currently moving. Adding a character and then changing the scale will not resize the character, until the character is told to move.

### Return value:

No return value.

### See also:

Scaling Characters

Object Types as Characters

forceCharacter

getCharacterScale

jumpCharacter

moveCharacter

setCharacterExtra

SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012