Setting entities properties during evaluating


It would be very troublesome to set the entities properties using some predefined actions(lotta work), and it easy to do it during tree evaluation process.
For example in the MoveTo behavior we set the target to which entity has to move during evaluation, and this property is later used by tasks and their actions.
But what if there will be some clashes?


scypior wrote Sep 8, 2008 at 7:22 PM

Here are two possible solutions:
  • Current(I hope so): only needed nodes are evaluated, and from this tasks are created so such clashes should be only result of inproper tree setting (for example, if you have two MoveTo nodes in sequence, one will be evaluated at a start, second will be evaluated later).
  • Don't set such properties. Again, example was about MoveTo behavior. One can set patrol checkpoints by creating sequence of MoveTo behaviors, but better (in terms of final game) solution would be if the entity will assign waypoints in other way (probably load data from level or something) and then will use that data with something like MoveTo. This solution is somewhat better, because it's easier to continue after the task was interrupted by something else. In normal sequence we will have to start from the beginning.

wrote Feb 13, 2013 at 2:52 AM