help nedeed with lua script for pressing a button and makin sound

i need help the script i use is this

what i used:
freeslot("sfx_platypus_sounds") =
sfxinfo[sfx_platypus_sounds].caption = "platypus sounds"
 
if (player.cmd.buttons & BT_TOSSFLAG)then
 S_StartSound sfx_platypus_sound
 
Lua only runs with Hooks - ways to identify the start and end of a string of code that will only be run when a specific condition is met.

Search Lua Hooks SRB2 in your browser and you will find the wiki page with a list of hooks, how to use them, and what they mean.

The If statement should be under a Hook. You should probably search in the page mentioned earlier to see what Hook better fits your needs.
 
Lua only runs with Hooks - ways to identify the start and end of a string of code that will only be run when a specific condition is met.

Search Lua Hooks SRB2 in your browser and you will find the wiki page with a list of hooks, how to use them, and what they mean.

The If statement should be under a Hook. You should probably search in the page mentioned earlier to see what Hook better fits your needs.
thanks
:)
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top