set_state_timeout - ryzom/ryzomcore GitHub Wiki


title: Set State Timeout description: published: true date: 2023-03-12T01:34:37.605Z tags: editor: markdown dateCreated: 2023-03-11T23:26:37.850Z

set_state_timeout

The set_state_timeout action sets up a timer for the current state that will trigger the state_timeout event when the elapsed time exceeds the specified range.

This timer is canceled (disabled) when the state is changed, making it useful for limiting the duration of a state or other timed behavior that should be canceled once the state is done. When changing to a punctual state, this timer is paused instead, and resumed once the punctual state ends and if the suspended state is re-entered.

Parameter Syntax

<min time>
[<max time>]

Parameters

  • <min time>: The minimum duration of the timer in game cycles.
  • [<max time>]: (Optional) The maximum duration of the timer in game cycles. If specified, the actual duration of the timer will be randomly selected between min_time and max_time. Otherwise, the timer will only last for the minimum time.

See also

  • Set Punctual State Timeout: Sets a timer that triggers the punctual_state_timeout event unless the punctual state is ended or changed before the timer elapses.
  • Set Timer T0-3: Set a timer for a game cycle duration or at a specific Ryzom time that triggers a timer_t0_triggered to timer_t3_triggered event.
  • Trigger Event 0-9: Triggers a user_event_0 to user_event_9 event handler for one or more specified other NPC groups.
  • Begin State: Switch to another state.
  • Random Select State: Changes the state of the NPC group to one of the listed states at random based on their assigned weights.
⚠️ **GitHub.com Fallback** ⚠️