-
Notifications
You must be signed in to change notification settings - Fork 0
Events
Shaye Garg edited this page Oct 3, 2021
·
4 revisions
Events let you trigger sounds and effects at certain points in an animation.
event
also uses some inbuilt struct
s and enum
s, which are declared:
// A direction along an animation.
enum Direction {
Forward, // Trigger when the animation value is increasing
Backward, // Trigger when the animation value is decreasing
Both // Trigger on both conditions
}
// An event during an animation
struct Event {
time: num, // The normalized (0 - 1) point during the animation
direction: Direction, // The direction at which to trigger the event
sounds: [str] = [none], // The Wwise Events to play when the Event is triggered
effects: [str] = [none] // The effects to play when the Event is triggered
}
You can create event
s like:
events <name: expr> = <events: expr>
// Which would be:
events name = [
Event {
time: 0.1,
direction: Direction.Forward,
sounds: [
"MySound",
"SomeOtherSound"
]
},
Event {
time: 0.5,
direction: Direction.Forward,
effects: [
"ElevatorPuffEffect"
]
}
]
name
: The name of the animation to trigger the Event
s on.
events
: An array of Event
s.