Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 10-13-2009, 11:45 AM   #1
ryu^
Fortress Forever Staff
 
Join Date: Oct 2008
Posts Rated Helpful 0 Times
deathmatch (ffa) is it possible?

hi, is it possible to create a free for all deathmatch gametype with lua?

i don't want no teams, just every man for themself, maybe this could be achieved by having a single team colour and each team kill counting as a normal kill.

furthermore, if the above is possible how about then extending this and say only allowing the soldier to be selectable starting with super shotgun only.
then allowing for 8 other weapons to be pickups (limited to slots) scattered around the map.

if either are possible, and somebody would be cool enough to get it working id be much appreciative. thanks
ryu^ is offline   Reply With Quote


Old 10-13-2009, 01:23 PM   #2
zE
Pew pew ze beams
 
zE's Avatar
 
Join Date: Jan 2008
Gametype: Gathers
Affiliations: pew pew
Posts Rated Helpful 11 Times
imo in lua SetConvar( "sv_friendlyfire", 1 ), so enables friendly fire when map on, and like a normal tk is equal -1 point, so in lua do tk= +2 so each tk = +1 point.

but dunno how to put that in code : P
zE is offline   Reply With Quote


Old 10-14-2009, 03:27 AM   #3
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
Frogger try to do this but he ran into some complications...
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 10-14-2009, 02:19 PM   #4
ryu^
Fortress Forever Staff
 
Join Date: Oct 2008
Posts Rated Helpful 0 Times
as in frogger attempted the first suggestion or the second suggestion? geokill

i would have thought just having 1 team with tks counting as kills would be at least possible!
ryu^ is offline   Reply With Quote


Old 10-15-2009, 02:20 AM   #5
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
Sorry, It was the second suggestion, trying to pickup weapons. He try to edit the ff scripts but they do not work online. I think he couldn't do it with Lua either
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 01-04-2010, 11:36 AM   #6
Bridget
Banned
 
Bridget's Avatar
 
Join Date: Sep 2008
Class/Position: Soldier
Gametype: AVD
Affiliations: TALOS
Posts Rated Helpful 5 Times
Can't you make pickup weapons using info_ff_script in LUA?

Code:
weapon_pickup = info_ff_script:new({
	name = "",
	model = "",
	weaponid = "",
	respawn_time = 0
)}

function weapon_pickup:touch(touch_entity)
	if(isPlayer(touch_entity)) then
		player = CastToPlayer(touch_entity)
		player:GiveWeapon(self.weaponid)
		self:Respawn(self.respawn_time)
	end
end

supershotgun_pickup = weapon_pickup:new({
	name = "Super Shotgun",
	model = "blah",
	weaponid = "ff_supershotgun",
	respawn_time = 60
)}
Correct me, if I'm wrong (in theory and syntax, it's been awhile. /cane)

Last edited by Bridget; 01-04-2010 at 11:37 AM.
Bridget is offline   Reply With Quote


Old 01-04-2010, 10:15 PM   #7
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.
The player:GiveWeapon(str_weapon_name) *might* cause a crash if you give a weapon to a class that normally doesn't have that weapon. You can get around it by using:

Code:
player:GiveWeapon(str_weapon_name, bool_autoswitch)
 - If autoswitch is true, they will switch to that weapon immediately after receiving it.

Example:
player:GiveWeapon( "ff_weapon_rpg", true )
__________________
#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


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 03:55 PM.


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