pub struct AreMiniGameObjectScripts {
pub on_create: ResRef,
pub on_heartbeat: ResRef,
pub on_anim_event: ResRef,
pub on_hit_bullet: ResRef,
pub on_hit_follower: ResRef,
}Expand description
The Scripts struct every minigame object carries.
Read by CSWMiniGameObject::LoadScripts, which obstacles use directly and
vehicles extend (see AreMiniGameVehicleScripts). Every slot defaults to
an empty resref and the engine writes that empty value into the script slot
whether or not the file supplied one, so an absent field clears a prior
script rather than leaving it in place.
OnHeartbeat is the fifth and last slot the base reads, after
OnAnimEvent.
It was missing from the write-up of this subsystem, and from the corpus scan the write-up was checked against, because the ARE root carries a script field under the same label: a scan keyed on bare labels sees the root’s and counts the nested one as already modelled.
Fields§
§on_create: ResRefFired when the object is created (OnCreate).
on_heartbeat: ResRefFired on the object’s heartbeat (OnHeartbeat).
on_anim_event: ResRefFired on a model animation event (OnAnimEvent).
on_hit_bullet: ResRefFired when a bullet hits the object (OnHitBullet).
on_hit_follower: ResRefFired when a track follower hits the object (OnHitFollower).
Trait Implementations§
Source§impl Clone for AreMiniGameObjectScripts
impl Clone for AreMiniGameObjectScripts
Source§fn clone(&self) -> AreMiniGameObjectScripts
fn clone(&self) -> AreMiniGameObjectScripts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AreMiniGameObjectScripts
impl Debug for AreMiniGameObjectScripts
Source§impl Default for AreMiniGameObjectScripts
impl Default for AreMiniGameObjectScripts
Source§fn default() -> AreMiniGameObjectScripts
fn default() -> AreMiniGameObjectScripts
Source§impl PartialEq for AreMiniGameObjectScripts
impl PartialEq for AreMiniGameObjectScripts
Source§fn eq(&self, other: &AreMiniGameObjectScripts) -> bool
fn eq(&self, other: &AreMiniGameObjectScripts) -> bool
self and other values to be equal, and is used by ==.