AddExp routine

TURBU

AddExp routine

 

Adds experience to heroes.

 

Syntax

 

procedure addExp(const id: smallint; number: integer);

 

Description

 

The addExp routine adds EXP to heroes.  If id is -1, it calls the party.addExp routine.  Otherwise, it adds EXP to hero #id.  If id is an invalid number, it gets redirected to hero #0.  If a character's EXP value goes above the maximum EXP value, it gets set to the maximum.

After adding EXP, if party.levelNotify is true, the routine shows a message if any heroes gained a level.

 

Related Topics

removeExp routine

TRpgParty.addExp

 

This help file was created with the free trial version of HelpScribble.