I actually wanted a local entinty for that, not sure if I need a global for it.
The code has been cut and I only create one car to test it and debug. But the real code is more complicated and I dont only create one car, I create lots of them. The cars have to follow eachother down a street.
The entities themselves are not created there, they will be created in a "spawning control" function to populate my street with traffic.
The entity* pointer you refer to in the action is not used to create an entity, it is just a local pointer to the car in front of it to allow each car to follow the car in front correctly, so each car needs a pointer to the car in front. Think of it as a kind of single direction "linked list" with a pointer to "next" in the list. Only the difference is that it is not a linked list of structs created with malloc() and sizeof(), instead of structs they are entities created with ent_create() and the "next" pointer is controled in the action function with a local pointer. That way each car can individually see the car in front of it to see where it is.

Back to the subject of the while loop, it still seems to never return to the main function to make a call to load the parameters into the skills after the wait(1), it looks like it stays stuck in the while loop forever... Can anybody help me with this?


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1