Impulsive? Use Filters to channel that...
In this lesson we are going to get back to working with impulses and take a look at filters. Filters are all tools used to manipulate an impulse.
-Our first filter is the “Game Condition Filter.” This filter will let an impulse pass through based on the state of the game. Basically what happens is an impulse enters the filter, the filter looks at a game state of your choosing and based on whether that is true or false can pass on or stop the impulse. Let’s look at the properties to get a better idea of what is going on.
-The first property we will look at is “type” and this will determine what aspect of the game state the filter is using. The choices are game started, game running, game ended, bronze, silver, gold or platinum medals.
-The next two options decide what the filter will do with the impulse. Select true means that if for example you have type set to game running and the impulse comes into the filter while the game is running it will pass the impulse through to the next event or filter you select.
Select False event does basically the same but bases it on being not true, so with the same example if the impulse comes in after the game has ended it will pass through to whatever you’ve chosen as a false event.
Keep in mind here that you do not need to use both selections. If for example you want an event to occur if the game is running but want nothing to happen if the game is over then you would select a true event but leave the false event empty.
-Now hopefully that makes a little bit of sense because our next filter, the “generic filter” does basically the same thing but uses numbers instead of the game state.
-Our first property of interest here is the “operation.” This determines how the filter will compare the two values which we will discuss setting in just a moment. The options are equals, not equal, greater, less, greater equal and less equal.
-Next we have our two comparison values, often one of the values will be set manually and the other will be tied to an operation or data source. Of course both can be tied to value targets but if both are set manually the values will never change making the results the same every time.
-And just like the previous filter select true and false event will decide where to send the impulse based on how the two values match up using the operation you have chosen.
-The “Impulse Clamp Filter” takes in multiple impulses before it sends one on to the next event.
-In the properties “min or minimum impulses to” sets how many impulses the filter needs to receive before it will send one.
-“Max impulses from,” is of course the maximum number of impulses the filter can send.
-“Wait ticks” sets how long the filter has to collect impulses, so for example by default we have 2 impulses in produce one impulse out with 600 wait ticks (or 10 seconds). If after 10 seconds the filter has only received 1 impulse it will reset and now has 10 more seconds to get 2 more impulses before it sends one out.
-Our next filter is the “Impulse Delay Filter.” This one will simply hold onto an impulse for a set amount of time before it passes it along to the next event or filter.
-In the properties menu the only new option we have to look at is “delay ticks” and this of course sets how long the filter will hold the impulse, remember 60 ticks equals one second.
-The “Impulse Splitter” takes in one impulse and then sends out multiple impulses. No new properties to check outhere, simply use the “select events/filters” option to select up to 8 events or filters.
-Our last filter to cover is similar to the first two. The “player condition filter” uses the state of the rider to filter the impulse. Your Types are, riding, bailout or on fire.