Overview
This guide outlines how to create a loon entity in the Alexmy scripting environment, including constants, sound paths, and zone entry scripts.
Constants
LOON_SOUND_PATH is defined by joining the path ["res.lmn", "sfx", "animal", "loon-call-42438.ogg"].
Scripts
The onEnterZone function triggers when an entity enters a zone. It calls emitSoundEffect to play the loon sound at 5% volume and then returns.
script onEnterZone=function onEnterZone() {
call emitSoundEffect([self, LOON_SOUND_PATH, 5%])
call emitSoundEffect([self, self_id, LOON_SOUND_PATH, 5%])
return()
}