Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 01-01-2009, 01:47 PM   #1
Bridget
Banned
 
Bridget's Avatar
 
Join Date: Sep 2008
Class/Position: Soldier
Gametype: AVD
Affiliations: TALOS
Posts Rated Helpful 5 Times
Few Questions

  1. How do I set up customs sounds? Currently, I have a sound as an entity in my map played through OutputEvent(), but for sounds I want to play for specific players, I obviously can not do that. So, how can I configure custom sounds for use through lua?
  2. How can I preform a collection of actions on an entire team at once, such as slowing them down and removing their items (weapons, grenades, buildables)?
  3. Is there an FF lua equal to sleep()? I want there to be a fifteen second delay before I call GoToIntermission() in a function.
  4. Can I have BroadCastMessage stay on screen longer? It shows for a second and then disappears.

Thanks

Last edited by Bridget; 01-01-2009 at 03:17 PM.
Bridget is offline   Reply With Quote


Old 01-01-2009, 10:41 PM   #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.
  1. Hopefully someone else can detail this. I'm not too strong in my sound knowledge. I know it involves the precache() lua function and mapname_level_sounds.txt, though. Check waterpolo for an example.
  2. You can (hopefully) use ApplyToTeam( team, { flag array } ).

    Example:
    Code:
    ApplyToTeam( GetTeam( Team.kRed ), { AT.kRemoveBuildables, AT.kStopPrimedGrens, AT.kRemovePacks } )
    If you can't do it with that function (like adding speed effects), then you're going to need a slightly complicated workaround. I'll get back to you on that.
  3. AddSchedule( "schedule_name", delay, function_name, [param], [param], ... )

    Example:
    Code:
    AddSchedule( "end_map", 15, GoToIntermission )
  4. You can do it with schedules. Just repeat the message for a while using AddScheduleRepeatingNotInfinitely( "schedule_name", delay, function_name, num_times_to_repeat, [param], [param], ... )

    Example
    Code:
    AddScheduleRepeatingNotInfinitely( "long_message", 1, BroadCastMessage, 5, "Hi there!" )
__________________
#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 01-02-2009, 05:39 AM   #3
Bridget
Banned
 
Bridget's Avatar
 
Join Date: Sep 2008
Class/Position: Soldier
Gametype: AVD
Affiliations: TALOS
Posts Rated Helpful 5 Times
Thanks (:
Bridget 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 01:47 PM.


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