just tried it with this no errors but the sound stays the same volume
-- Manage trigger of footfall sound effects
if ( GetGamePlayerControlFootfallType() ~= -1 ) then
if ( GetGamePlayerControlMovement() == 0 or GetGamePlayerControlJumpMode() == 1 ) then
-- no footfalls here
else
tttriggerfootsound=0
if ( GetGamePlayerControlThirdpersonEnabled() == 1 ) then
-- third person uses protagonist animation to trigger footfalling
tttobjframe=0.0
tttobj=GetEntityElementObj(GetGamePlayerControlThirdpersonCharactere())
if ( tttobj>0 ) then
if ( GetObjectExist(tttobj) == 1 ) then
tttobjframe=GetObjectFrame(tttobj)
end
end
-- anim based footfall/groundsound triggers (hard coded) then
for twalktypes = 1, 13, 1 do
if ( twalktypes == 1 ) then ttleftframe = 306 ttrightframe = 323 end
if ( twalktypes == 2 ) then ttleftframe = 349 ttrightframe = 369 end
if ( twalktypes == 3 ) then ttleftframe = 386 ttrightframe = 401 end
if ( twalktypes == 4 ) then ttleftframe = 429 ttrightframe = 442 end
if ( twalktypes == 5 ) then ttleftframe = 470 ttrightframe = 479 end
if ( twalktypes == 6 ) then ttleftframe = 528 ttrightframe = 538 end
if ( twalktypes == 7 ) then ttleftframe = 555 ttrightframe = 569 end
if ( twalktypes == 8 ) then ttleftframe = 601 ttrightframe = 615 end
if ( twalktypes == 9 ) then ttleftframe = 641 ttrightframe = 654 end
if ( twalktypes == 10 ) then ttleftframe = 674 ttrightframe = 684 end
if ( twalktypes == 11 ) then ttleftframe = 705 ttrightframe = 716 end
if ( twalktypes == 12 ) then ttleftframe = 756 ttrightframe = 759 end
if ( twalktypes == 13 ) then ttleftframe = 817 ttrightframe = 819 end
if ( tttobjframe >= ttleftframe and tttobjframe <= ttrightframe+1 ) then
if ( GetGamePlayerControlFootfallCount() == 0 and tttobjframe>ttleftframe and tttobjframe<ttrightframe ) then
-- left foot
SetRawSoundVolume(tttriggerfootsound()+100)
tttriggerfootsound=1
SetGamePlayerControlFootfallCount(1)
end
if ( GetGamePlayerControlFootfallCount() == 1 and tttobjframe>ttrightframe ) then
-- right foot
SetRawSoundVolume(tttriggerfootsound()+100)
tttriggerfootsound=1
SetGamePlayerControlFootfallCount(0)
end
end
end
else
if ( GetGamePlayerControlPlrHitFloorMaterial() ~= 0 ) then
if ( GetGamePlayerControlWobble()>315 and GetGamePlayerControlFootfallCount() == 0 ) then
SetGamePlayerControlFootfallCount(1)
tttriggerfootsound=1
end
if ( GetGamePlayerControlWobble()<315 and GetGamePlayerControlFootfallCount() == 1 ) then
SetGamePlayerControlFootfallCount(0)
end
end
end
if ( tttriggerfootsound == 1 ) then
-- play footfall sound effect at specified position
SetGamePlayerControlLastFootfallSound( PlayFootfallSound ( GetGamePlayerControlFootfallType(), GetCameraPositionX(0), GetCameraPositionY(0), GetCameraPositionZ(0), GetGamePlayerControlLastFootfallSound() ) )
end
end
end
I have tried this too, no errors but no change:
SetRawSoundVolume(tttriggerfootsound,100)
I am not sure what iID I set before the volume level the standard format is :
SetRawSoundVolume: SetRawSoundVolume ( iID, iVolume ) -- where iID is the raw engine sound index and iVolume from 0 to 100
how do I address the raw engine sound index ?
thinking about it logically I would assume its this
SetRawSoundVolume(RawSoundPlaying,100)
but that doesn't work either maybe its where I put it in gameplayercontrol that will make the difference
like I said I am no coder lol but I do try
until it breaks then I stop
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped