Component:RandomEventGenerator

From Resonite Wiki
Revision as of 15:20, 20 October 2024 by 989onan (talk | contribs) (fix links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
Random Event Generator component as seen in the Scene Inspector


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Random event generator is a component that is used to generate random events and point events given a minimum and maximum delay between events.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
MinInterval Float The minimum time in seconds before another event is generated
MaxInterval Float The maximum time in seconds before another event is generated
RandomPointGenerator IPointGenerator a point generator component that is used as the limiter on where random point events can be located.
Events list of SyncDelegate`1<Action> Random events that when calling a Sync Delegate provide no data to it's arguments.
PointEvents list of SyncDelegate`1<Action`1<Float3>> Random events that when calling a Sync Delegate provide a Float3 to it's arguments.

Behavior

Generates random events and sends them to the lists of Events and PointEvents.

Examples

Can be used with a RandomAudioClipPlayer PlayAtPoint(Float3 point) sync delegate to play noises randomly at random points from RandomPointGenerator without using ProtoFlux.

See Also