Custom Classes - EtiTheSpirit/FastCastAPIDocs GitHub Wiki
RBXLuaScriptSignal
An unofficial wrapped variant of an RBXScriptSignal featuring versatile API used to create custom events. This object is created via the Signal module included in FastCast through the Signal:CreateNewSignal() method.
Methods
RBXLuaScriptSignalConnection Connect(Function f)
Runs f when the event fires, passing in all of the arguments specified in Fire(...) to this function.
Tuple Wait()
Delays the current thread until the event has fired, returning all of the arguments specified when the event was fired.
void DisconnectAll()
Forces all connections made to this RBXLuaScriptSignal to disconnect. This should be called if your custom object is destroyed, otherwise you may cause memory leaks.
void Fire(Tuple args)
Fires the event with the specified arguments.
RBXLuaScriptSignalConnection
This is a connection object returned by the Connect method of RBXLuaScriptSignal:Connect()
Methods
void Disconnect()
Causes this event to disconnect from its parent RBXLuaScriptSignal (it will never be run when the event is fired after disconnection)
CastStateInfo
A CastStateInfo represents information pertaining to an ActiveCast's simulation information.
Properties
RBXScriptSignal UpdateConnection
The underlying RBXScriptSignal that is connected to one of RunService's update methods to update the parent ActiveCast.
boolean Paused
Represents whether or not this ActiveCast should be simulating. If true, the cast will freeze and not simulate any physics data.
number TotalRuntime
The amount of time that this cast has been running for in seconds.
number DistanceCovered
The amount of distance that this cast has traveled.
boolean IsActivelySimulatingPierce
An internal value intended to determine whether or not the system is calculating a pierce. This is used to make sure that the ray can't continue if a pierce calculation takes longer than a tick (and also error, because your pierce function should never yield!)
CastTrajectory[] Trajectories
A list of CastTrajectory objects that represent a specific section in time of simulation. A new instance of this object will be added to this list whenever a method that can change the behavior or motion of the projectile is called.
CastRayInfo
A CastRayInfo stores information about how to fire rays in a given ActiveCast.
Properties
RaycastParams Parameters
The RaycastParams used in all raycasts from this ActiveCast. This can be freely edited. When the ActiveCast is instantiated, the input parameters are cloned, and this property is set to the clone instance.
WorldRoot WorldRoot
The WorldRoot that this ActiveCast should simulate in. By default, it is equal to whatever its parent Caster is set to, but can be changed at any time.
number MaxDistance
The maximum distance that the ray can travel. By default, it is the magnitude of the parent Caster's directionWithMagnitude parameter when the Fire method is called.
Instance CosmeticBulletObject
A reference to the input cosmetic bullet from the parent Caster's Fire method. See Caster for more information.
function CanPierceCallback
A reference to the input pierce function from the parent Caster's Fire method. See Caster for more information.