Is there a way to get a pointer to a PLAYER struct by its displayName? In Java I would store the object into a Hashmap or Hashtable with its displayName as the key ... how would I do that in lice-c? Or do I have to write a c++-plugin?
If there is a way ... can someone give me a short code example?
Thanks for your answer, but I don't think that a linked list is what I need.
The displayName is dynamic so I can't create a linked list item.
For example I have a struct that holds a lot of additional information for some model entities in my levels. I have a data file that holds all those additional information and I build the reference from those data to my entities by starting each line in my data file with the entity name as it was set in WED. When starting the game I'd like to create a struct object for each line in my data file and store its pointer into something like a hashtable. When a level is loaded I'd like to get the referring struct objects for my entities using the entity name.
I don't see how I could do that with a linked list ... if I could, how ???
look under lite-c contributions. i've written a linked list implementation which is suitable for hashmaps. i guess i've also written down how to do it there, if there's no complete code sample for a hashmap.
Re: get struct by name???
[Re: Joey]
#218314 07/27/0820:5807/27/0820:58
for using engine_getobj you need to know the object name ... I'd like to find a struct by some of it's internal veriables, for example displayName which is part of the struct itself.