costume (still, [still, [still...]], walk, [walk, [walk...]], talk, [talk, [talk...]]);
Creates a costume containing an animation for standing still, talking and walking in one or more direction. Therefore the number of parameters must be a multiple of 3. Each of the parameters must be an animation created by the anim function or NULL (indicating that the animation slot will not be used - for example, a character will never be seen in a certain state while facing a certain direction).
The number of directions (let's call it n for the time being) represented by the costume is the total number of parameters divided by 3. The first n animations (or NULLs) specify how a character will look while standing still. The next n specify how the character will look while walking. The final n determine how a character will appear while talking.
In each of these three groups, the directions are specified in the same order - clockwise from facing the camera. Therefore, if the costume has 6 parameters, the costume will represent 2 different directions and the parameters will be interpreted as: standing still facing south, standing still facing north, walking south, walking north, talking facing south, talking facing north. If the costume has 12 parameters, the costume will have 4 different directions and the parameters will be interpreted as: standing still facing south, standing still facing west, standing still facing north, standing still facing east, walking south, walking west, walking north, walking east, talking facing south, talking facing west, talking facing north, talking facing east.
You can also specify an offset with setCharacterAngleOffset to add to the calculations when selecting direction.
The return value is the costume which has been created.
# Create a costume with only one direction var c = costume (anim ('ego.duc', 0), # STANDING STILL anim ('ego.duc', 1, 2, 3, 4), # WALKING anim ('ego.duc', 5, 6, 7, 8)); # TALKING # Create a costume with 4 directions (which will never talk) var d = costume (anim ('me.duc', 0), # STANDING STILL anim ('me.duc', 3), # STANDING STILL anim ('me.duc', 6), # STANDING STILL anim ('me.duc', 9), # STANDING STILL anim ('me.duc', 1, 2), # WALKING anim ('me.duc', 4, 5), # WALKING anim ('me.duc', 7, 8), # WALKING anim ('me.duc', 10, 11), # WALKING NULL, # TALKING NULL, # TALKING NULL, # TALKING NULL); # TALKING
SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012