09-20-2007, 08:45 PM | #1 |
A Very Sound Guy!
Fortress Forever Staff
Join Date: May 2005
Location: UK
Posts Rated Helpful 15 Times
|
[REQUEST]: Can Lua coders and Mappers pair up?
ok i'll like make this thread a Lua request board for mappers to call upon the talent of all the Lua coders out there, and likewise for Lua coders to post themselves up with A/S/L details etc
|
|
09-20-2007, 08:47 PM | #2 |
A Very Sound Guy!
Fortress Forever Staff
Join Date: May 2005
Location: UK
Posts Rated Helpful 15 Times
|
i for one know a bit on lua coding. i'm free to hook people up with Lua if i've got time
|
|
09-20-2007, 08:52 PM | #3 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
this is actually a very good idea Merv. i am completely ignorant about LUA and have 3 maps ready to go. although Sidd has helped me out alot with 2 of them, i still need 1 for my sgwar map. if anybody cares to draw it up here are the details:
1)2 teams-red and blue 2)6 spawn points each 3)engys only 4)constantly replenishes ammo 5)1 door split in 2(top half going up, bottom half going down) 6)doors opening every 15 seconds and closing every 15 seconds(i will tweek this as needed) 7)sounds? all i can think of now.
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
09-20-2007, 09:55 PM | #4 |
Community Mapper&Idiot
Join Date: Mar 2007
Location: Finland
Posts Rated Helpful 1 Times
|
I dont need this lua for a while but I guess there are people faster than me wanting to have warpath style maps.
So 5 CP, each team has 4 respawns. So when lets say Red team has CP 4, they spawn on their 4th spawn, and when they have CP 3 they spawn on their 3rd spawn, when they have CP 2 they spawn on their 2nd spawn and when they have CP 1 (the way the game starts) they spawn at their main respawn. When one team has the CP 5 the round restarts. Also note, if Red team has CP 4, that means that they have CP 3, 2 and 1. Blue can only capture CP 4. So In order to take CP2 they must first capture 4, 3 and then they can take 2. I think the basic idea is known to most of the people. |
|
09-21-2007, 12:56 AM | #5 |
Join Date: Mar 2007
Location: United Kingdom
Posts Rated Helpful 0 Times
|
I really need a piece of lua code for rmpfort2 but I am just utterly hopeless at code related things.
Basically, when red cap the blue flag I want some ambient_generics and an env_shake to trigger (also when blue cap the red flag of course). |
|
09-21-2007, 05:46 PM | #6 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
I love FF and want to give something back. Hopefully I can help the community get the maps it wants. I have been coding for a long time now and have experience with Lua (developing addons in WoW, and being the programmer that integrated Lua into a game engine on a team I worked on)
There's tonnes of mappers needing help from the looks of it, and I can't give you answers yet. But I wanna dig into it and learn how this all works with FF so that I can. If there is a solid mapper out there that has a good idea of what they need to have developed and they have their map finished or close to it I'd like to work together with them so that we can learn. I ask that because we want to have it playable ASAP so that we can test and work out the bugs having it up for playtesting, and there are simply too many people needing attention. Send me a PM on the forums here if you're interested and we can check out your maps. |
|
09-21-2007, 07:02 PM | #7 | |
A Very Sound Guy!
Fortress Forever Staff
Join Date: May 2005
Location: UK
Posts Rated Helpful 15 Times
|
Quote:
|
|
|
09-21-2007, 07:08 PM | #8 |
Lua Team
Join Date: Mar 2007
Posts Rated Helpful 1 Times
|
wiki pls
|
|
09-22-2007, 04:14 AM | #9 |
Retired FF Staff
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
merv, I'm pretty much done with ff_fatties, all I need is some lua code that makes the round timer display on my "speedometer" texture ala aardvark and to make dead ppl respawn behind the glass until the round is over.
If you think you can help me with that, I could maybe release ff_fatties before leaving for europe in 2 days. |
|
09-22-2007, 04:28 AM | #10 | |
The Bestest
|
Quote:
SOMEONE HELP HIM! How long are you going to be gone? |
|
|
09-22-2007, 04:41 AM | #11 |
Retired FF Staff
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
around 3-4 months
|
|
09-22-2007, 12:30 PM | #12 |
Insane Coder
|
i have been coding for a long time now and anyone who has a interesting map they would like lua help with is free to contact me via any of the IM programs in my profile for help im also in FF's irc channel on gamesurge often.
|
|
09-23-2007, 01:29 AM | #13 |
Community Mapper&Idiot
Join Date: Mar 2007
Location: Finland
Posts Rated Helpful 1 Times
|
Help Sh4x!
|
|
09-23-2007, 03:37 AM | #14 |
Retired FF Staff
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
I sent my package to mervaka already but if Steven thinks he can do it faster, that'd be great. Cause I'm leaving in 2 days so yeah... after that it's gonna be alot more complicated to map for me, I don't even know if it's gonna be possible.
|
|
09-23-2007, 04:22 PM | #16 |
Retired FF Staff
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
I think a simple variable that increments every second passed to a proxy texture would be cleaner. BUT I still don't know how to do that.
Here's my actual lua: Code:
-- ff_fatties1.lua ----------------------------------------------------------------------------- -- includes ----------------------------------------------------------------------------- IncludeScript("base_ctf") IncludeScript("base_location") ----------------------------------------------------------------------------- -- globals (lawl... unless it starts with "local" its already a global!) ----------------------------------------------------------------------------- -- override this POINTS_PER_CAPTURE = 2 ROUND_TIMER_START = 60 ROUND_TIMER_STOP = 0 ROUND_TIMER_CURRENT = ROUND_TIMER_START ----------------------------------------------------------------------------- -- initial stuff ----------------------------------------------------------------------------- function startup() -- set up team limits SetPlayerLimit( Team.kBlue, 0 ) SetPlayerLimit( Team.kRed, 0 ) SetPlayerLimit( Team.kYellow, -1 ) SetPlayerLimit( Team.kGreen, -1 ) -- both teams limited to medics & hwguys for i = Team.kBlue, Team.kRed do local team = GetTeam( i ) team:SetClassLimit( Player.kScout, -1 ) team:SetClassLimit( Player.kSniper, -1 ) team:SetClassLimit( Player.kSoldier, -1 ) team:SetClassLimit( Player.kDemoman, -1 ) team:SetClassLimit( Player.kPyro, -1 ) team:SetClassLimit( Player.kSpy, -1 ) team:SetClassLimit( Player.kEngineer, -1 ) team:SetClassLimit( Player.kCivilian, -1 ) end -- Start door schedule StartDoorOpenSchedule() end ----------------------------------------------------------------------------- -- player stuff ----------------------------------------------------------------------------- function player_spawn( spawn_entity ) local player = CastToPlayer( spawn_entity ) player:AddHealth( 100 ) player:AddArmor( 300 ) -- Players get everything except grenades player:AddAmmo( Ammo.kNails, 400 ) player:AddAmmo( Ammo.kShells, 400 ) player:AddAmmo( Ammo.kRockets, 400 ) player:AddAmmo( Ammo.kCells, 400 ) player:AddAmmo( Ammo.kDetpack, 1 ) player:RemoveAmmo( Ammo.kGren1, 4 ) player:RemoveAmmo( Ammo.kGren2, 4 ) end function player_killed( killed_entity ) local player = CastToPlayer( killed_entity ) -- Guy stays dead until round is over player:SetRespawnable( false ) end ----------------------------------------------------------------------------- -- capture point overrides ----------------------------------------------------------------------------- function red_cap:oncapture( player, item ) -- do base class stuff (play sounds) -- make the call passing in self as well as the params basecap.oncapture( self, player, item ) DoCaptureLogic() end function blue_cap:oncapture( player, item ) -- do base class stuff (play sounds) -- make the call passing in self as well as the params basecap.oncapture( self, player, item ) DoCaptureLogic() end ----------------------------------------------------------------------------- -- map stuff ----------------------------------------------------------------------------- function DoCaptureLogic() ConsoleToAll( "DoCaptureLogic" ) DoRoundResetLogic() end function DoRoundResetLogic() ConsoleToAll( "DoRoundResetLogic" ) -- stop round timer schedule if its still going DeleteSchedule( "round_timer_schedule" ) -- Reset round timer ResetRoundTimer() -- close door CloseDoor( "forceshield" ) -- reset door schedule StartDoorOpenSchedule() -- finally, respawn everybody RespawnEveryone() end function DoRoundOverLogic() ConsoleToAll( "DoRoundOverLogic" ) CheckTeamAliveState( Team.kBlue ) CheckTeamAliveState( Team.kRed ) end function CheckTeamAliveState( team ) ConsoleToAll( "CheckTeamAliveState" ) -- Need to test if one player on either team is still -- alive and if so, award that team a point local c = Collection() if (team == Team.kBlue) then c:GetByFilter({ CF.kPlayers, CF.kTeamBlue }) else c:GetByFilter({ CF.kPlayers, CF.kTeamRed }) end ConsoleToAll( "Count: " .. c:Count() ) if (c:Count() > 0) then local bAlive = false for temp in c.items do local player = CastToPlayer( temp ) if player:IsAlive() then bAlive = true end end if bAlive then local team = GetTeam( Team.kRed ) team:AddScore( 1 ) end end end function StartDoorOpenSchedule() ConsoleToAll( "starting door_open_schedule" ) AddSchedule( "door_open_schedule", 3, door_open_schedule ) end function ResetRoundTimer() ROUND_TIMER_CURRENT = ROUND_TIMER_START end function RespawnEveryone() ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips, AT.kAllowRespawn, AT.kReturnDroppedItems }) end ----------------------------------------------------------------------------- -- map stuff - schedules ----------------------------------------------------------------------------- function door_open_schedule() ConsoleToAll( "door_schedule" ) ConsoleToAll( "opening forceshield" ) OpenDoor( "forceshield" ) ConsoleToAll( "starting round timer schedule" ) AddScheduleRepeating( "round_timer_schedule", 1, round_timer_schedule ) end function round_timer_schedule() ConsoleToAll( "round_timer_schedule" ) -- Adjust round timer ROUND_TIMER_CURRENT = ROUND_TIMER_CURRENT - 1 ConsoleToAll( "Timer: " .. ROUND_TIMER_CURRENT ) if (ROUND_TIMER_CURRENT < 1) then DoRoundOverLogic() DoRoundResetLogic() end end |
|
09-23-2007, 07:09 PM | #17 |
Join Date: May 2007
Posts Rated Helpful 0 Times
|
This sticky is greatly welcomed. I vow to help when I am able if anyone asks for me, but my knowledge is limited. Just a few points to help people starting out, and please correct me if I'm wrong:
1) LUA is only needed for Fortress related entities and most specifically Team related entities. This includes: Flags, Caps, Spawns, Bags, and Team activations such as Door entries. Things like time triggers can be set independently without utilizing LUA scripts generally speaking if they aren't related to Team Events. 2) There is a folder, I think inside the FortressForever/maps folder which has an archive of various LUA scripts organized by type. Copy and paste from these if you can comprehend which ones you require. |
|
09-23-2007, 07:15 PM | #18 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
i still need a LUA for my sg_war map!!!!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
09-24-2007, 12:06 AM | #20 | |
Join Date: Apr 2007
Posts Rated Helpful 0 Times
|
Quote:
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|