Main Menu


Sponsored Links

  


  
  

Help - Creating Characters

This help topic explains registration methods of characters and parts. These methods are beginning with word Register and should be used only once immediately after object declaration or in a derived class constructor

void ICharacter::Register ( int iWidth, int iHeight, double dX0, double dY0 )

This method is usually invoked in a character constructor. You should invoke it only once when creating a character. Usually you do not need to use it in a movie when using ready to use characters. First two parameters determine the character dimensions. Second two parameters determine coordinates of a character origin.

 void ICharacter::RegisterPart ( Part &PartToReg, const string &sDefaultDecalImage, double dX, double dY, double dX0, double dY0, const Part *pParent = NULL )

Every character part should also be registered. This is usually done in a character constructor and you do not need to use this method in your movie when using ready to use characters. But you may also want to add an additional part to an existing character. In this case you should declare an additional part and register it using this function. First parameter - is a part to register. Most of the ready to use characters have these parts as a members of their classes. sDefaultDecalImage should point to an image on your hard drive (like "c:\\myimage.svg") or on the internet (like http://www.webcartoonmaker.com/lib/images/wcm/washington_head_washed.png). This image will be assigned to "DEFAULT" part decal. dX and dY are coordinates of the part relative to character origin or parent part origin when a parent part is set. dX0 and dY0 are coordinates of a part origin. You can optionally supply a pointer to a parent part in pParent parameter

void ICharacter::RegisterPart ( Part &PartToReg, double dX, double dY, double dX0 = 0, double dY0 = 0, const Part *pParent = NULL )

As you can see, this is almost the same method but with missing sDefaultDecalImage parameter. You should use this method only to change registration parameters of a part which was already registered. For example if you changed a head decal you may want to set eyes and mouth at a different coordinates. Coordinates dX and dY in these functions are relative to currently defined part position. For example if you want to move an eye to the right by 2 pixels you should use it as MyCharacter.RegisterPart ( MyCharacter.LeftEye, 2, 0 );

void Part::RegisterParent ( const Part &Parent )

You do not need to use this method if a proper part parent was set in RegisterPart method. But in some cases you may want to set a proper parent later or earlier than using RegisterPart. For example our IHumanCharacter interface registers parents for all parts but it cannot register parts yet because their images are unknown at the time. You can use this method in such cases to set a part parent

void Part::RegisterDecal ( const string &sDecalName, const string &sDecalImage )

You can register an additional decal for a part using this method. "DEFAULT" decal is usually set in RegisterPart method but this method should be used to register additional decals. sDecalName is a name of an additional decal (it may be standard like "WINK1" or custom like "RED_FACE"). sDecalImage should point to an image on your hard drive (like "c:\\myimage.svg") or on the internet (like http://www.webcartoonmaker.com/lib/images/wcm/washington_head_washed.png)

void ISpeakableCharacter::RegisterSpeech ( const string &sSAPIEngine, const string &sSAPIVoice, double dSAPISpeed = 0.5, double dSAPIPitch = 0.5, double dSAPIVolume = 1.0 )

If you do not like your character to use the default voice, you can register a different voice for it. sSAPIEngine should have one of the following values: "SAPI4" (for MS Speech API 4), "SAPI5" (for MS Speech API 5) or SAPII (for internal Web Cartoon Maker Speech API). sSAPIVoice should determine the voice name like "Microsoft Mary" or "Microsoft Sam" or any other installed on your computer. dSAPISpeed determine how fast does your character speak. The value should be between 0 and 1. dSAPIPitch determine the voice pitch. The value should be between 0 and 1. O means low pitch and 1 means high pitch. dSAPIVolume is a volume between 0 and 1

  
News

New Tales Animator Video by Alan Sturgess

Alan Sturgess shared an excellent video he made using Tales Animator! You can still download Tales Animator here. Unfortunately it is only available for Wi

...

Simple Online Character Designer

There is a prototype of simple online character designer available HERE. It is only a prototype, it does not contain many pieces yet but it can already generat

...

Book is updated

Now our book "Web Cartoon Maker: A Fun Way to Learn C++" is fully in synch with WCM 1.5! It is available for download and online reading HERE.

...

Web Cartoon Maker 1.5 is here!

Web Cartoon Maker 1.5 is finally here! You can download it HERE! Here is what was updated in version 1.5: Web Cartoon Maker Desktop Edition is now fully standal

...

read more news...


Poll