Sunday, February 10, 2008

Emergent Behaviour

So I've implemented half of the system to allow my humans to load and unload trucks. I am fighting the AIWheeledVehicle2 resource at the moment, because it didn't expose much to TorqueScript and I need control of the pathing system. The AIWheeledVehicle2 resource reads in any path you assign to the vehicle and then uses C++ and physics to control it.

I guess I still want it to do this but I need access to where it is along the path so I can program the nodes with instructions. I've managed to get the trucks to roll to a stop on every node, so now I am going to extend a method to TorqueScript so I can get the current node and check the correlating nodes in the mission to determine if they need to stop or not. In most cases they only stop at depots such as the rocket they are refueling or the hanger they are ferrying parts from.

I also want to work on what happens to men and trucks when aliens start flying around. If humans are picked up and you shoot the attacking alien, the human will drop to the floor and then run back to it's path - emergent behaviour very cool! But I want the humans to cower in fear as well, so the alien presence will inhibit their own objectives. This means the player need to keep aliens away from humans and truck if the mission is to progress.

More soon.

No comments: