|
|
Re: How to add entity properties
[Re: Coisox]
#209846
06/06/08 07:48
06/06/08 07:48
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
Did you know about the already defined skills? You can redefine them to your own names. There are already 100 skills to use for such needs.
With your example you would make a definition like this:
#define power skill1
Then each ENTITY will have this property (you can access with this name) myBall.power, hisBall.power, ...
|
|
|
Re: How to add entity properties
[Re: HeelX]
#210544
06/11/08 12:11
06/11/08 12:11
|
Joined: Jan 2002
Posts: 300 Usa
Rich
Senior Member
|
Senior Member
Joined: Jan 2002
Posts: 300
Usa
|
Theoretically, you could extent the Entity datastructure in atypes.h, but this is not recommended. Try encapsulating further attributes in a struct that is hinged into an entity skill (write the pointer into a skill and retrieve it during runtime to access it). OR: make a datastructure and hinge the entity in it Hi, Sorry to jump in but this was a question I was wondering about as well. I knew about the skills but I find I may need to store more data (list of object, entities, ect, even if I ended up not needing to do it I would like to learn) and wanted to extend the entity properties. Could you maybe describe how this is done in a brief way or point me to a source on how I can hinge a struct to the ENTITY struct? Sorry I'm still learning all of this, Thanks so much.
|
|
|
|