Yeah, a score keeper wasn't exactly the best example in the world, however it would still be nice to be able to ecapsulate it without having to resort to globals. This adds to the portability of it alot.
If WDL lets you define custom objects somehow that dont need to be associated with a model or bitmap, you could make a score object that you could re-use for player1,player2 etc without having to worry about making up new globals for each new players score. It'd be nice to be able to something like (syntax invented here, so bear with me
)
synonym Player1 function;
synonym Player2 function;
define TargetScore skill10;
define CurrentScore skill11;
action ScoreObj{
my.TargetScore=10;
my.CurrentScore=0;
while (1){
if (my.CurrentScore==my.targetScore){
Display_End_of_level_mesage();
break;
}
//insert code to update score here
}
}
create(player1,ScoreObj);
create(player2,ScoreObj);
or even better, being able to define an array of synonyms that help a player score.
Anyone know if something like this is currently possible?
Any ideas on what a function synonym actaully is?
Cheers
------------------
Dale Drechsler
dale@dalesmatrix.com
http://www.dalesmatrix.com