- Joined
- Jan 27, 2016
- Messages
- 89
Ive been thinking of this for a while and have tried a few times, but I can never do it in a satisfyingly efficient way. The event system I describe would function like this:
>It would trigger after every certain amount of time, lets say every 60 seconds between 1 and 3 events fire.
>The actions of the events would have very varied requirements, such as say the player having 100 or less gold, or him having at least 10 buildings near the base, or another event having fired before it.
>The events would have a varied chance rate, so one would have a 10 in 200 (or any amount that totals the total "chances" of all events) chance of fireing (if its conditions are met) while another would have a 2 in 200
>The actions for the events would all be in a single trigger, as the amount of triggers to fulfill what I need would otherwise be very large
I can manage to make the skeleton for this easily, the problems are that it effectively becomes a massive range of If/Then/Else scripts that would keep firing while the trigger tries to find the Event that it was told to fire, then if its conditions are met it will fire it, otherwise the loop starts anew. Is there a more efficient way to accomplish all of this fulfilling all the listed conditions?
>It would trigger after every certain amount of time, lets say every 60 seconds between 1 and 3 events fire.
>The actions of the events would have very varied requirements, such as say the player having 100 or less gold, or him having at least 10 buildings near the base, or another event having fired before it.
>The events would have a varied chance rate, so one would have a 10 in 200 (or any amount that totals the total "chances" of all events) chance of fireing (if its conditions are met) while another would have a 2 in 200
>The actions for the events would all be in a single trigger, as the amount of triggers to fulfill what I need would otherwise be very large
I can manage to make the skeleton for this easily, the problems are that it effectively becomes a massive range of If/Then/Else scripts that would keep firing while the trigger tries to find the Event that it was told to fire, then if its conditions are met it will fire it, otherwise the loop starts anew. Is there a more efficient way to accomplish all of this fulfilling all the listed conditions?