ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
Adding breathing sound to CS Hud

Posted by/on
Question/AnswerMake Oldest Up Sort by Ascending
  09:01:32  4 February 2014
profilee-mailreply Message URLTo the Top
tsf00181
(Senior)
 
On forum: 07/20/2013
Messages: 60
Never mind, got it working. Was just a stupid mistake on my part....didn't realize the "slots" were different between CS and pripyat.
  04:01:29  3 February 2014
profilee-mailreply Message URLTo the Top
tsf00181
(Senior)
 
On forum: 07/20/2013
Messages: 60
Adding breathing sound to CS Hud

First, I apologize if this has been asked before. I haven't been able to find anything on the subject. Plenty on adding a "gasmask" sound to call of pripyat, but nothing on Clear Sky.

So I'm trying to had a gasmask breathing sound to use along side Xtreme Hud. The hud works fine, but I just can't get a sound out of clear sky.

Here is what I currently have in Bind_stalker.script for CS
After:
---QUOTATION---
object_binder.update(self, delta)
---END QUOTATION---


This:

---QUOTATION---
sound_breath.sound_update()
---END QUOTATION---



That works fine in CoP.

Sound_Breath.script looks like this.

---QUOTATION---

---------------------????????????? ???? ??????? ??? ?????? ?????-----------------------------
-- The table contains a section of suits with a helmet. Supplement those that are in your mod!
local outfits = {
["scientific_outfit"]=true,
["exo_outfit"]=true,
["cs1_heavy_outfit"]=true,
["cs2_medium_outfit"]=true,
["stalkerexo_outfit"]=true,
["helm_respirator"]=true,
["helm_respirator_joker"]=true,
["helm_battle"]=true,
["helm_tactic"]=true,
["helm_protective"]=true,
["ecologist_red_outfit"]=true,
["ecologist_green_outfit"]=true
}

-- the sound of breathing ( Need file sounds\actor\gas_mask_idle.ogg )
local snd_obj = sound_object("actor\\gas_mask_idle"

-- call from update (actor_binder:update(delta) )
function sound_update()
local outfit = db.actor:item_in_slot(7) or db.actor:item_in_slot(12)
if outfit and outfits[outfit:section()] then
if not snd_obj laying() then snd_obj lay_at_pos(db.actor, vector ():set (0, 0, 0), 0, sound_object.s2d) end
else
if snd_obj laying() then snd_obj:stop() end
end
end
---------------------------------------------------------------------------------------------
---END QUOTATION---




I Have also tried this:

---QUOTATION---
---------------------????????????? ???? ??????? ??? ?????? ?????-----------------------------
-- The table contains a section of suits with a helmet. Supplement those that are in your mod!
local outfits = {
["scientific_outfit"]=true,
["exo_outfit"]=true,
["helm_hardhat"]=true
}

-- the sound of breathing ( Need file sounds\actor\gas_mask_idle.ogg )
local snd_obj = sound_object("actor\\gas_mask_idle"

-- call from update (actor_binder:update(delta) )
function sound_update()
local outfit = db.actor:item_in_slot(7) or db.actor:item_in_slot(12)
if outfit and outfits[outfit:section()] then
if not snd_obj laying() then snd_obj lay_at_pos(db.actor, vector ():set (0, 0, 0), 0, sound_object.s2d) end
else
if snd_obj laying() then snd_obj:stop() end
end
end
---------------------------------------------------------------------------------------------
---END QUOTATION---



This first version starts the game, but doesn't play the gasmask_idle sound. The second crashs the game right before the game finishes loading.

So can someone help me out here? I know the problem is the differences before CoP and CS, I'm not a lua scripter though so I'm in the dark. Any advice would be appreciated.....or maybe a a link to a mod that has the hud overlays and sound in one.

Thanks!
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2021 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.