05-07-2008, 12:53 AM | #1 |
Fortress Forever Staff
|
Flag Return Noise on Base_id.lua
The current IncludeScript("base_id"); has no noise when the flag returns. So nobody hears sounds on flag return on cornfield and palermo right? I tried to code it so it would work on my map, but it didnt work.
------------------------------------------------- --Flags ---------------------------------------- function base_id_flag: onreturn( ) -- let teams know that the flag was returned local team = GetTeam(self.team) SmartTeamMessage(team,"#FF_TEAMRETURN","#FF_OTHERT EAMRETURN") SmartTeamSound(team, "yourteam.flagreturn","otherteam.flagreturn") SmartTeamSpeak(team, "CTF_FLAGBACK", "CTF_EFLAGBACK") local flag = CastToInfoScript( entity ) end The sounds are precached in the base_id.lua already. What do i do? (since some of the function base_id_flag stuff in in the base_id.lua already, does it have to be put in my lua differently?) |
|
05-07-2008, 02:06 AM | #2 |
Fortress Forever Staff
Join Date: Sep 2007
Class/Position: O: Scout Affiliations: {NFO} - New Family Order Posts Rated Helpful 0 Times
|
Code:
function baseflag:precache() PrecacheSound(self.tosssound) PrecacheSound("yourteam.flagstolen") PrecacheSound("otherteam.flagstolen") PrecacheSound("yourteam.drop") PrecacheSound("otherteam.drop") PrecacheSound("yourteam.flagreturn") PrecacheSound("otherteam.flagreturn") PrecacheSound("yourteam.flagcap") PrecacheSound("otherteam.flagcap") info_ff_script.precache(self) end Code:
function baseflag:onreturn( ) -- let the teams know that the flag was returned local team = GetTeam( self.team ) SmartTeamMessage(team, "#FF_TEAMRETURN", "#FF_OTHERTEAMRETURN") SmartTeamSound(team, "yourteam.flagreturn", "otherteam.flagreturn") SmartTeamSpeak(team, "CTF_FLAGBACK", "CTF_EFLAGBACK") local flag = CastToInfoScript( entity ) RemoveHudItemFromAll( flag:GetName() .. "_d" ) RemoveHudItemFromAll( flag:GetName() .. "_c" ) AddHudIconToAll( self.hudstatusiconhome, ( flag:GetName() .. "_h" ), self.hudstatusiconx, self.hudstatusicony, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconalign ) self.status = 0 end |
|
05-07-2008, 03:11 AM | #3 |
Fortress Forever Staff
|
i tried that already
|
|
06-11-2008, 02:41 AM | #4 |
internet user
Fortress Forever Staff
Join Date: Jun 2007
Posts Rated Helpful 42 Times
|
I have found the problem, it's the baseflag's team, its usually 0 therefor breaking the smart team vox.
so the quick fix is changing your copy of onreturn() from Code:
local team = GetTeam( self.team ) Code:
local team = GetTeam( Team.kBlue ) |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|