09-27-2007, 10:50 PM | #41 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
Can someone write me a LUA script that does this:
There is prop static on the map. Someone touches the prop static and then it shows a message to everyone "Phrase that everyone sees" . The person then gets 1000 FF points and 10 Frag points. Then in order to stop people from just camping on the spot and getting points, i want it to have a delay of like 60 seconds where if you touch it in the 60 seconds, it wont work. That or it logs the person and that person cannot touch that prop static again. Can anyone help me? |
|
09-27-2007, 11:05 PM | #42 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
Haven't tested this myself, however it should restock all soldiers with 25 rockets every 60 seconds. Change the 2 varaibles at the top to change the restock interval and amount of rockets that are restocked:
Code:
-- Number of seconds between restocks RESTOCK_INTERVAL = 60 -- Amount of rockets to restock every RESTOCK_INTERVAL seconds RESTOCK_AMT_ROCKETS = 25 -- standard map startup function function startup() -- Do other team and class limit setup here AddScheduleRepeating( "RestockPlayers", RESTOCK_INTERVAL, RestockPlayers ) end -- function to perform the actual restock function RestockPlayers() for i = 1, 32 do local player = CastToPlayer(GetEntity(i)) if (player ~= nil) then if player:IsAlive() and (player:GetClass() == Player.kSoldier) then player:AddAmmo( Ammo.kRockets, RESTOCK_AMT_ROCKETS ) end end end end |
|
09-28-2007, 12:07 AM | #43 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
any particular place that should be in my lua? i tried it and it not only allowed a green team(set to -1, worked fine before) but it crashes FF.
EDIT: i appreciate your help man
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
09-28-2007, 12:24 AM | #44 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
got it work but now it cancels out my team and class restrictions
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
09-28-2007, 12:30 AM | #45 |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
Sorry, I should have asked you beforehand, do you currently have a startup function in your lua file? If so, you'll need to do the following:
|
|
09-28-2007, 12:55 AM | #46 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
got it thanks man!!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
10-01-2007, 01:38 PM | #47 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
i have a working lua and i want to add the soccerball and i want them(team) to gain points for holding the ball(not very fast though). like in murderball. what do i add into my lua?
i also want it to go back to its location after being dropped for 5 seconds. anything else you need to know to do this let me know. thanks!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
10-02-2007, 12:43 PM | #48 |
A Very Sound Guy!
Fortress Forever Staff
Join Date: May 2005
Location: UK
Posts Rated Helpful 15 Times
|
you need a repeating schedule. when the schedule fires, points are given to the ball's current owner.
|
|
10-02-2007, 12:50 PM | #49 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
um...i have no idea what you just said...lol..
i know nothing about LUA
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
10-02-2007, 10:12 PM | #50 | |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
Quote:
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
|
10-06-2007, 09:33 PM | #51 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
can somebody tell me what to add to my LUA to constantly give scouts and medics nades?
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
10-08-2007, 11:44 AM | #52 | |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Quote:
|
|
|
10-10-2007, 03:12 AM | #53 | |
Nutcracker
|
I don't really think this thread is a good place to ask for LUA related stuff. If I see a new posts in this thread at the list, I never know what they are about and usually don't bother checking. It's much easier to help people when the thread topic says what the question is about.
Speaking of which, we NEED a lua sub forum. The mapping forum is just too crowded. Oh right... please? edit: ... even when you add the lua documentation wiki or whatever, people won't find all the answers from there. Quote:
Last edited by A1win; 10-11-2007 at 09:15 AM. |
|
|
10-10-2007, 03:29 AM | #54 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
i agree we need a lua subforum...
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
10-12-2007, 12:16 AM | #55 | |
Join Date: Sep 2007
Posts Rated Helpful 0 Times
|
Quote:
Good luck with that. I asked for a "tutorial" section just last week in a PM to the forum leader and didn't get it. Lua help would have fit in just fine under a Tutorial subforum. But regarding the crowding of the mapping section...the number of posts are dieing down quick. I haven't had to scroll past the first page in two days. And the new posts seem to all be about new maps anyway. |
|
|
10-12-2007, 02:11 PM | #56 |
Join Date: Oct 2007
Posts Rated Helpful 0 Times
|
Any LUA knowledgable coders please PM me to help with a flagrun (warpath) style map with command points...
URGENT! |
|
02-25-2008, 02:42 AM | #57 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Unstickied due to this thread. Make any lua requests 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 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|