View Single Post
Old 10-27-2013, 02:25 AM   #99
Jay Mofo Mills
Jay|mOfO|Mills
Beta Tester
 
Join Date: Feb 2009
Location: Santa Fe, NM
Gametype: Snag the flag beotches
Posts Rated Helpful 8 Times
ok so Dexter's code from above works, but if I have this code in the lua as well the func_button named engy_spanner_button and gen_onclank doesn't work. Everything else in my lua is fine, I tested it, but this code here makes the func_button not operate when both are in the same lua.....

Code:
FORT_POINTS_PER_DET = 100

detpack_trigger = trigger_ff_script:new({})
function detpack_trigger:onexplode( trigger_entity )
	if IsDetpack( trigger_entity ) then
		detpack = CastToDetpack( trigger_entity )
		if IsPlayer( detpack:GetOwner() ) then
		local player = detpack:GetOwner()
			--if player:GetTeamId() ~= self.team then
			BroadCastMessage("Beam 1 has been activated")
			OutputEvent("beam1", "TurnOn")
			OutputEvent("wrecking_ball_trigger", "Enable")
			OutputEvent("beam_sound", "PlaySound")
			player:AddFortPoints( FORT_POINTS_PER_DET, "Detting the generator" )
			end
		end
	return EVENT_ALLOWED
end
-- Don't want any body touching/triggering it except the detpack
function trigger_detpackable_door:allowed( trigger_entity ) return EVENT_DISALLOWED 
end

Last edited by Dexter; 10-27-2013 at 03:40 AM.
Jay Mofo Mills is offline   Reply With Quote