View Single Post
Old 12-31-2009, 06:44 AM   #55
GenghisTron
AKA LittleAndroidMan
D&A Member
Beta Tester
 
GenghisTron's Avatar
 
Join Date: Sep 2007
Location: Dystopia
Class/Position: Demo/Medic
Gametype: CTF
Affiliations: [TALOS] [SR]
Posts Rated Helpful 11 Times
Ok, well now I have another problem.

I added the remove_projectile lua from this thread to my lua, and it breaks my lua for some reason. It allows me to select a team, but now there's 4 teams instead of 2, and all the class choices are blacked out. Just like when you load up a map with no game type in the lua. All I have in there is base_ctf lua, and then the SetVelocity lua you gave me for my ramps.

Code:
IncludeScript("base_ctf");

------------------------------------------
-- jump triggers
------------------------------------------
base_jump = trigger_ff_script:new({ pushx = 0, pushy = 0, pushz = 0 })

-- push people when they touch the trigger
function base_jump:ontouch( trigger_entity )
	if IsPlayer( trigger_entity ) then
		local player = CastToPlayer( trigger_entity )
		
		player:SetVelocity( Vector( self.pushx, self.pushy, self.pushz ) )
	end
end

-- blueside red ramp
rredjump = base_jump:new({ pushx = -1500, pushy = -1500, pushz = 0  })

--blueside blue ramp
rbluejump = base_jump:new({ pushx = 1500, pushy = 1500, pushz = 0  })

--redside red ramp
lbluejump = base_jump:new({ pushx = -1500, pushy = 1500, pushz = 0  })


--redside blue ramp
lredjump = base_jump:new({ pushx = 1500, pushy = -1500, pushz = 0  })

------------------------------------------
-- remove projectiles (Thanks squeek)
-- http://forums.fortress-forever.com/showthread.php?t=19904
------------------------------------------

remove_projectiles = trigger_ff_script:new({ })

function remove_projectiles:allowed(allowed_entity)
	if IsNotProjectile(allowed_entity) then
		return false
	end
	return true
end

function IsNotProjectile( allowed_entity )
	return IsPlayer(allowed_entity) || IsGrenade(allowed_entity) || IsTurret(allowed_entity) || IsDispenser(allowed_entity) || IsSentrygun(allowed_entity) || IsDetpack(allowed_entity)
end
I tested my map by taking out the remove projectiles lua, and it worked fine. Once I put it back in, it screwed up. Same compile, same everything.
__________________
GenghisTron is offline   Reply With Quote