Jump to content

Recommended Posts

Posted

I'm wanting to have a sound play when the Player hits a key...

I can't seem to get it to work. Is this the Lua?

 

if KeyHit(KEY_Z)==1 then
LoadSound('abstract::impact_metal12.wav')
PlaySound(impact_metal12.wav,10,1,1)
end 

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Posted

:P That actually made perfect sense to me.. Thanks.

 

sound1=LoadSound('abstract::impact_metal12.wav')
if KeyHit(KEY_Z)==1 then
PlaySound(sound1,1,1)
end

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...