Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 03-24-2009, 01:34 AM   #1
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
How do you extinguish an ENV_FIRE?

I need some help on this one. I'm including the whole LUA but the command line that troubles me concerns ENV_FIRE entities. As you can see below I am triggering several entities after a flag capture. I want the "blue_cap_fire" to "StartFire" and then to "ExtinguishTemporary" one second after... I can't seem to get the fire to extinguish. Help is appreciated.


Quote:
IncludeScript("base_ctf");
IncludeScript("base_location");
IncludeScript("base_respawnturret");

my_cap = basecap:new({})

function my_capncapture(player, item)
if player:GetTeamId() == Team.kBlue then
OutputEvent( "blue_cap_sound", "PlaySound" )
OutputEvent( "blue_cap_shake", "StartShake" )
OutputEvent( "blue_cap_splash", "Splash" )
OutputEvent( "blue_cap_fire", "StartFire" )
OutputEvent( "blue_cap_fire", 1, "ExtinguishTemporary" )
elseif player:GetTeamId() == Team.kRed then
OutputEvent( "red_cap_sound", "PlaySound" )
OutputEvent( "red_cap_shake", "StartShake" )
OutputEvent( "red_cap_splash", "Splash" )
OutputEvent( "red_cap_fire", "StartFire", )
OutputEvent( "red_cap_fire", 1, "ExtinguishTemporary" )
end

-- let the teams know that a capture occured
SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap")
SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP")
SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP")

end

my_cap_red = my_cap:new({team = Team.kRed,
item = {"blue_flag","yellow_flag","green_flag"}})

my_cap_blue = my_cap:new({team = Team.kBlue,
item = {"red_flag","yellow_flag","green_flag"}})
Doughnut-4|4- is offline   Reply With Quote


Old 03-24-2009, 01:44 AM   #2
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
You can use:

OutputEvent( entity, input, parameter, delay )
Code:
OutputEvent( "blue_cap_fire", "ExtinguishTemporary", "", 1 )
or:

AddSchedule( schedule_id, duration, function, parameters, ... )
Code:
AddSchedule( "blue_cap_fire", 1, OutputEvent, "blue_cap_fire", "ExtinguishTemporary" )
If the first one doesn't work, the second on definitely will.
__________________
#FF.Pickup ยค Fortress-Forever pickups

My Non-official Maps
Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic
Beta FF_Myth - FF_Redlight_Greenlight

Sick of the people on the internet, always moanin'. They just moan.
- Karl Pilkington
squeek. is offline   Reply With Quote


Old 03-24-2009, 03:19 AM   #3
pF
no war but class war
Fortress Forever Staff
 
pF's Avatar
 
Join Date: Oct 2007
Location: big bad berlin
Class/Position: Soldier / Scout
Gametype: ctf
Affiliations: [w~k!]
Posts Rated Helpful 3 Times
Beer.

/helpful
__________________
Support FF:

Gay And Lesbian Fiction | Teen Books | Bath Products
pF is offline   Reply With Quote


Old 03-24-2009, 04:09 AM   #4
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
I am happy to say playing with your code and concluding that the "Extinguish" command is bugged...
I resolved to find a backdoor using disable and enable to extinguish it.

Quote:
OutputEvent( "blue_cap_fire", "StartFire" )
OutputEvent( "blue_cap_fire", "disable", "", 1 )
OutputEvent( "blue_cap_fire", "enable", "", 2 )
Doughnut-4|4- 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 11:25 PM.


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