change extended type

BlitzMax Forums/BlitzMax Programming/change extended type

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Or you could just have a "toWarrior()" method on your Wizard class (and vice versa) which returns a new warrior object and do something like this (myCharacter is of type character, currently representing a wizard instance):
myCharacter = myCharacter.toWarrior()
Now myCharacter is of type character, but it represents a warrior instead.

Whether this is feasible (or even desirable) depends entirely on how your data is modeled - but in the absence of duck typing / dynamic typing, there isn't really much you can do about it.