Ok, another update. Yesterday, I wrote about a little issue in the WalkAround state of goats. Well, it somehow took the best part of the evening to fix that. Somehow the trigger for starting to move kept getting hit before the position was picked, having to goat literally go nowhere. Well, done now.
The more interesting thing to talk about is a little groundwork for giving orders. I already had a system to find objects when given a location. I upgraded that with a class of references to everything you need to interact with an object. In the end, orders will all be "interact with this object over there" and the kind of object is central to know what "interact" really means.
When I right click on an object, selected objects will run a method on a base Worldobject class to decide which virtual void to run, with some basic general stuff and possibly overriding methods in a derived class.
Sorry if this is technical. It means that I define basic behaviours for interacting with objects of a certain kind that should apply to anyone. When a certain agent has its own behaviour for some interaction, I'll program that and run that instead. This is how I understand object inheritance in C#.
Well, all I ended up with visually is that Holocene looks exactly like it did the day before yesterday, so I won't bother you with screenshots or the like, but now it should be set up to do things I did not program yet. I like to have it flexible, because I know it is getting more complex quickly now.
No comments:
Post a Comment