Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 09-16-2007, 01:15 AM   #1
sir_frags
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
LUA

I've searched back to July 7, so here it goes....

Can someone please post the lines I put in lua.txt to stop people from spawning with nades?

Thanks!!!

*Frags*

Last edited by sir_frags; 11-06-2007 at 04:19 PM.
sir_frags is offline   Reply With Quote


Old 09-16-2007, 01:18 AM   #2
OneEyed
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
Unfortunately it's not a one liner fix. You'd have to edit all gameplays to have this feature. Basically on respawn or backpack pickup you'd need to remove the grenades using RemoveWeapon
OneEyed is offline   Reply With Quote


Old 09-16-2007, 01:28 AM   #3
Steven_m64
Insane Coder
 
Join Date: Jun 2007
Posts Rated Helpful 0 Times
Send a message via ICQ to Steven_m64 Send a message via AIM to Steven_m64 Send a message via MSN to Steven_m64 Send a message via Yahoo to Steven_m64
if you want it for a custom map you can have this function in your maps .lua file.

Code:
function player_spawn( player_entity )
	local player = CastToPlayer( player_entity )

	player:RemoveAmmo( Ammo.kGren1, 4 )
	player:RemoveAmmo( Ammo.kGren2, 4 )
end
Steven_m64 is offline   Reply With Quote


Old 09-16-2007, 03:32 AM   #4
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
Can I take this thread a step further and ask:
How do you give full grenades at spawn?
Lastly, how do you give armor & supplies at spawn?
Doughnut-4|4- is offline   Reply With Quote


Old 09-16-2007, 03:46 AM   #5
Steven_m64
Insane Coder
 
Join Date: Jun 2007
Posts Rated Helpful 0 Times
Send a message via ICQ to Steven_m64 Send a message via AIM to Steven_m64 Send a message via MSN to Steven_m64 Send a message via Yahoo to Steven_m64
same as the one i posted but replace the RemoveAmmo lines with:

player:AddAmmo( Ammo.kGren1, 4 )
player:AddAmmo( Ammo.kGren2, 4 )
Steven_m64 is offline   Reply With Quote


Old 09-16-2007, 03:49 AM   #6
nodnarb
 
Join Date: Mar 2007
Posts Rated Helpful 5 Times
Quote:
Originally Posted by Doughnut-4|4-
Can I take this thread a step further and ask:
How do you give full grenades at spawn?
Lastly, how do you give armor & supplies at spawn?
make sure you put the "includes" in also.
nodnarb is offline   Reply With Quote


Old 09-16-2007, 03:59 AM   #7
Doughnut-4|4-
 
Join Date: May 2007
Posts Rated Helpful 0 Times
I think I found the rest of the LUA code I need on a previous posting. Ironically, one of my postings. I'll put the link here if anyone is wondering about adding ammo and cells and armor like I was asking. And like this thread showed.

http://www.fortress-forever.com/foru...ht=Ammo.kGren1
Doughnut-4|4- is offline   Reply With Quote


Old 09-16-2007, 06:37 AM   #8
stino
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
the lua is open source, so take a look at the lua files form dustbowl, they don't have nades, so it should be somewhere in that lua file
stino 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:06 PM.


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