Identifying entities by name problem

Posted By: Ready

Identifying entities by name problem - 01/24/08 15:23

Ok I don't really know how to explain this but I'll try anyways ^^
I basically want every entity to have a unique name, while they share the same action.

For instance, I could give an entity a name in its action to identify it, like
Code:
entity* myname;
action actioname
{
myname = my;
}


But what if several entities use the same function? I don't want to write a new function for each entity in my level :s

Basically, I want every entity to be able to be manipulated through the console...
Like when I type entityX.z += 100; in the console, it should move entityX up 100 units

I tryed using the entities name (in WED) but then name.z += 100; does nothing at all :s

I bet its something super simple I just don't know what >_>
Posted By: Wicht

Re: Identifying entities by name problem - 01/24/08 16:08

handle(object);

and

ptr_for_handle(handle);
Posted By: Ready

Re: Identifying entities by name problem - 01/24/08 16:25

Aah thanks. Now since I know what I'm looking for, I found a nice little snippet in aum47
© 2024 lite-C Forums