PDA

View Full Version : conc effect


nufan
03-06-2009, 10:21 PM
I'm very new to mapping, and even less experienced in LUA. What I want to know is if it's possible to emulate the conc effect in some manner?

My idea is to make a map for practicing conc aim, so want to be able to make a area on the ground, so when you stand in it you get conced (not necessarily the push effect, just the disorientation). Then I can setup targets around the room of varying size & moving etc to practice hitting over & over till I don't suck :P

Possible?

squeek.
03-06-2009, 10:29 PM
It's very easy using player:AddEffect( EFFECT, EFFECT_DURATION, ICON_DURATION, SPEED_MULTIPLIER ).

conc_aim = trigger_ff_script:new({ })

function conc_aim:ontrigger( trigger_entity )
if IsPlayer(trigger_entity) then
local player = CastToPlayer(trigger_entity)
player:AddEffect( EF.kConc, -1, 0, 0 )
end
end

Put that in your mapname.lua file and make a trigger_ff_script and name it conc_aim.

That'll give you an infinite conc effect whenever you step into the conc_aim trigger.

nufan
03-06-2009, 10:59 PM
Awesome, thanks for that :)

Unfortunately, now I will have no excuse for rubbish conc aim :cry: