Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 11-10-2007, 02:06 AM   #21
Ihmhi
[AE] 0112 Ihmhi *SJB
Wiki Team
Fortress Forever Staff
 
Ihmhi's Avatar
 
Join Date: Mar 2007
Location: Newark, NJ, United States
Class/Position: A little bit o' everythin'
Gametype: Also a little bit o' everythin'
Affiliations: [AE] Asseater, *SJB Straight Jacket Brigade
Posts Rated Helpful 3 Times
Send a message via AIM to Ihmhi Send a message via MSN to Ihmhi Send a message via Yahoo to Ihmhi
Okay, I created ff_testmapzorz_level_sounds.txt and put it in the maps folder alongside my map.

It contains:

Code:
// game sounds for ff_testmapzorz
"ff_testmapzorz.ka_boom"
{
    "channel"    "CHAN_STATIC"
    "volume"    "1.0"
    "soundlevel"     "SNDLVL_100dB"
    "wave"        "*ff_testmapzorz/ka_boom.wav"
}
I put the sound ka_boom.wav in the folder sound/ff_testmapzorz.

My Lua has this line near the top:
Code:
PrecacheSound("ff_testmapzorz.ka_boom")
And this is the detpack code it is tied to:

Code:
base_wall_trigger = trigger_ff_script:new({ team = Team.kUnassigned, team_name = "neutral" })

function base_wall_trigger:onexplode( explosion_entity )
if IsDetpack( explosion_entity ) then
local detpack = CastToDetpack( explosion_entity )

-- GetTeamId() might not exist for buildables, they have their own seperate shit and it might be named differently
if detpack:GetTeamId() ~= self.team then
OutputEvent( self.team_name .. "_wall", "Kill" )
BroadCastSound ( "ff_testmapzorz.ka_boom" )
BroadCastMessage( "ololololol" )


end
end

-- I think this is needed so grenades and other shit can blow up here. They won't fire the events, though.
return EVENT_ALLOWED
end

yellow_wall_trigger = base_wall_trigger:new({ team = Team.kYellow, team_name = "yellow" })
green_wall_trigger = base_wall_trigger:new({ team = Team.kGreen, team_name = "green" })
Yet I get this in console:

Code:
SV_StartSound: *ff_testmapzorz/ka_boom.wav not precached (0)
SV_StartSound: *ff_testmapzorz/ka_boom.wav not precached (0)
Now, here's the kicker. If I open scripts/game_sounds_ff_misc.txt and add the following in there:

Code:
// game sounds for ff_testmapzorz
"ff_testmapzorz.ka_boom"
{
    "channel"    "CHAN_STATIC"
    "volume"    "1.0"
    "soundlevel"     "SNDLVL_100dB"
    "wave"        "*ff_testmapzorz/ka_boom.wav"
}
It not only works fine, but I can remove the ff_testmapzorz_level_sounds.txt.

I want to figure out how to get a custom sound to play, but I can not just add lines to existing game files. It has to be seperate files. What if I make a map that I want to release? I need to have files that can be downloaded to the proper directories and have everything work. ):
__________________
Support FF:
Anime: The Thread: Reloaded
The one and only anime thread on these here forums.

Select the pistol, and then, select your horse.
Ihmhi is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.