Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 05-16-2008, 07:32 PM   #1
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
What is the code for shotty ammo?

Ok so I have this as a trigger in my map:

Code:
-- Gives player concs / removes all other ammo
function fullresupply( player )
	player:AddHealth( 100 )
	player:AddArmor( 300 )

	player:RemoveAmmo( Ammo.kNails, 400 )
	player:RemoveAmmo( Ammo.kShells, 400 )
	player:RemoveAmmo( Ammo.kRockets, 400 )
	player:RemoveAmmo( Ammo.kCells, 400 )
	player:RemoveAmmo( Ammo.kManCannon, 1 )
	
	player:RemoveAmmo( Ammo.kGren1, 4 )
	player:AddAmmo( Ammo.kGren2, 4 )
end
And it does almost everything I want, but for some reason it doesn't remove shotgun ammo (single or super). What am I missing to remove this ammo?
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 05-16-2008, 08:03 PM   #2
PartialSchism
Keep On Keepin' On
 
PartialSchism's Avatar
 
Join Date: Feb 2008
Location: Mississippi
Class/Position: Offense
Gametype: Fun
Affiliations: I'm bad at FF, and my customs suck
Posts Rated Helpful 0 Times
Send a message via AIM to PartialSchism
i tried it and it works fine.... do you have something that looks like this under your code? resupplyzone would be the name of your trigger_ff_script. Removes everything but whats in the gun's clip already.

Code:
resupplyzone = trigger_ff_script:new({ })

function resupplyzone:allowed( allowed_entity )
        if IsPlayer( allowed_entity ) then
                local player = CastToPlayer( allowed_entity )
                fullresupply( player )
        end
        return true
end
PartialSchism is offline   Reply With Quote


Old 05-16-2008, 08:32 PM   #3
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
yep that's there...not sure why it's not removing it.

I'll run a few test though...got all the time I need now!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan 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 02:14 PM.


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