Manual/addCharacter
From Hungrysoftware
< Manual
Contents |
Syntax
addCharacter (thisObject, atX, atY, thisCostume);
Purpose
Adds a character on the screen which represents thisObject. The character can then be animated using the animate function, moved using moveCharacter and forceCharacter and so on. There is no specific character data type; the character can be controlled by referencing the object type thisObject which the character represents.
The thisCostume parameter must be a complete costume (the result of a call to the costume function) or a single animation (the result of a call to the anim function).
Return value
No return value.
Example
addCharacter (fakeEgo, 200, 300, anim ('ego.duc', 0, 1, 2));
var myCostume = costume (anim ('ego2.duc', 0), anim ('ego.duc', 1, 2, 3), anim ('ego.duc', 4, 5, 6)); addCharacter (ego, 500, 300, myCostume);