Jump to content

aweaweaweaweawe

Member
  • Posts

    1
  • Joined

  • Last visited

aweaweaweaweawe's Achievements

  1. im trying to making a player do a animation and lock the controls while the character do the animation and i am encountering problems, i dont know if i am using the right method and and there is 2 list of animation files here is the code, the first is in anims_X and animsold, what list i should use to get the name of the animation? here is my code function twitchIntegration_OnKeyPressed(key) local doEvent = key if doEvent >= 75 and doEvent <= 82 then local nome = getCurrentUserProfileName() if nome ~= "ExtraBanal" then --the test is == but ~= just for test purpose local distOffset = 30 local player = getPlayer(); local posX = player:getX() + ZombRand(distOffset)-distOffset/2; local posY = player:getY() + ZombRand(distOffset)-distOffset/2; local posZ = player:getZ(); local audioManager = getSoundManager() if doEvent == 82 then local sound = ZombRand(8) local name = "zombierand"..tostring(sound) audioManager:PlayWorldSoundImpl(name,false,posX,posY,posZ,0,distOffset+5,0,false) elseif doEvent == 79 then local sound = ZombRand(3) + 1 local name = "Thumpdistant0"..tostring(sound) audioManager:PlayWorldSoundImpl(name,false,posX,posY,posZ,0,distOffset+5,0,false) elseif doEvent == 80 then audioManager:PlayWorldSoundImpl("windowclose",false,posX,posY,posZ,0,distOffset+5,0,false) elseif doEvent == 81 then audioManager:PlayWorldSoundImpl("doorclose",false,posX,posY,posZ,0,distOffset+5,0,false) elseif doEvent == 75 then audioManager:PlayWorldSoundImpl("BrokenGlass",false,posX,posY,posZ,0,distOffset+5,0,false) elseif doEvent == 76 then audioManager:PlayWorldSoundImpl("BrokenGlass",false,posX,posY,posZ,0,distOffset+5,0,false) elseif doEvent == 77 then player:PlayAnim("pushups") else print("erro") end end end end Events.OnKeyPressed.Add(twitchIntegration_OnKeyPressed)
×
×
  • Create New...