Used to set a cooldown per agent when interacted.
Verse using statement |
using { /Verse.org/SceneGraph } |
Members
This class has both data members and functions.
Data
| Data Member Name | Type | Description |
|---|---|---|
Duration |
?float |
The duration in seconds after a successful interaction, before the interacting agent can initiate a subsequent interaction. This is only used if the duration is greater than 0.0. Modifying this does not affect the cooldown remaining for an agent already on cooldown. This property gives other agents time to interact, when there is a limited number of Simultaneous Interactors. |
RemainingDuration |
?[agent]float |
Deprecated. The cooldown remaining, in seconds, before a particular agent is able to initiate an interaction on this component. Use GetRemainingDurationForAgent instead. |
ExpiredEvent |
listenable(payload) |
Event which fires when the per agent cooldown expires. Sends the agent which was previously affected by the cooldown. |
Functions
| Function Name | Description |
|---|---|
SetRemainingDurationForAgent |
Set the remaining per agent cooldown duration in seconds, for the agent supplied.When a cooldown starts on the component for an agent, if there is an in progress interaction for that agent, it is canceled. |
GetRemainingDurationForAgent |
Get the remaining per agent cooldown duration in seconds, for the agent supplied. Returns zero when that agent has no cooldown running. |