Scripts / Lost in LUA (Cadence Alpha)

Author
Message
NL2012
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 5th Jan 2014
Location: The Netherlands
Posted: 18th Jan 2014 16:17
Looking at f.e a simple FPSR lua like key.lua. It has a entry like :



if PlayerDist < 80 then

PlaySound0(e);



i am used to use a syntax like:



Sound:Load("Sound/Player/flashlight_02_on.wav")



where's the difference and what syntax too used

prob a noob question but thank you for responding

HP Z820 Workstation, 2 X 8 Intel Xeon E5-2665 processor

64GB DDR3-1333, nvidia geforce gtx 660
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 24th Jan 2014 05:24
your basically asking if the player is within 80 distance from the entity (which is pretty much touching range) and if so play sound. This would play the sound that is listed in the entities properties. Under sound 0.

NL2012
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 5th Jan 2014
Location: The Netherlands
Posted: 24th Jan 2014 12:51
Thank you Teabone



How simple can it be!

the Sound:Load("Sound/Player/flashlight_02_on.wav")"is a lua example from Leadwerks which has a API for easy user scripting (and premade scripts). That confused me...being new to FSP i totaly overlooked the tables on the left pane.

I'm a content developer for many years but a very very noob programmer.



Thanks a million

HP Z820 Workstation, 2 X 8 Intel Xeon E5-2665 processor

64GB DDR3-1333, nvidia geforce gtx 660

Login to post a reply

Server time is: 2024-04-25 22:03:47
Your offset time is: 2024-04-25 22:03:47