How would it work? Like CExpGenSpawner, RandomTree would allow game designers to call up seperate ExplosionGenerators, but with different functionality:
Code: Select all
[randomtree_example_code_ARGH01]
{
class=CRandomTree;
[properties]
{
percentile=10, 50, 40;
explosionGenerator1=custom:ARGH_RANDOM01;
explosionGenerator2=custom:ARGH_RANDOM02;
explosionGenerator3=custom:ARGH_RANDOM03;
}
water=1;
air=1;
ground=1;
count=30;
}
explosionGeneratorX would be used X times, where X = the number of entries in percentile.
Simple, eh? It really shouldn't be that hard to code (just push the explosionGeneratorX entries to an array, get a random number between 1 and 100, see where it falls, play the Generator), and it'd allow for a lot of really cool randomization!