Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

CMO ScenEdit_LocalSound (string)

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> CMO ScenEdit_LocalSound (string) Page: [1]
Login
Message << Older Topic   Newer Topic >>
CMO ScenEdit_LocalSound (string) - 12/10/2019 4:34:07 PM   
kevinkins


Posts: 2184
Joined: 3/8/2006
Status: offline
Never tried to play a sound before and can't get the function to work. Has anyone? Below is the syntax.

Functions in the Lua Documentation:
ScenEdit_MsgBox (string, style)
ScenEdit_LocalSound (string)

This is what I ran and the result:
ScenEdit_MsgBox ("This works", 1)
ScenEdit_LocalSound ("Explosion_air_medium.mp3")

Result:
>> ScenEdit_MsgBox ("This works", 1)
ScenEdit_LocalSound ("Explosion_air_medium.mp3")
ERROR: [string "Console"]:2: attempt to call global 'ScenEdit_LocalSound' (a nil value)

nil value might indicate the "ink" between the function and the sound\effects folder is nonexistent.

Have to relearn lua every time I use it - so no expert here. I want a sound to indicate a car bomb going off using the enter area trigger.

Thanks.

_____________________________

“The study of history lies at the foundation of all sound military conclusions and practice.”
― Alfred Thayer Mahan

Post #: 1
RE: CMO ScenEdit_LocalSound (string) - 12/11/2019 6:09:58 AM   
michaelm75au


Posts: 13200
Joined: 5/5/2001
From: Melbourne, Australia
Status: online
ScenEdit_PlaySound("C:\\Command\\CMANO_Dev\\Debug\\Sound\\Effects\\Alert_missile.mp3", 0)
ScenEdit_PlaySound("Alert_missile.mp3", 0)


_____________________________

Michael

(in reply to kevinkins)
Post #: 2
RE: CMO ScenEdit_LocalSound (string) - 12/11/2019 6:21:28 AM   
michaelm75au


Posts: 13200
Joined: 5/5/2001
From: Melbourne, Australia
Status: online
My error.
I had built the commands with 'local' in them at one stage and then changed their names/values. Forgot to update the extract for the documentation.

The method showing in the Lua Console function list is generally correct as it validates against that.

_____________________________

Michael

(in reply to michaelm75au)
Post #: 3
RE: CMO ScenEdit_LocalSound (string) - 12/11/2019 10:32:29 PM   
kevinkins


Posts: 2184
Joined: 3/8/2006
Status: offline
Thanks ... think I have it now.

_____________________________

“The study of history lies at the foundation of all sound military conclusions and practice.”
― Alfred Thayer Mahan


(in reply to michaelm75au)
Post #: 4
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> CMO ScenEdit_LocalSound (string) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.137