View Single Post
Old 10-24-2010, 06:55 PM   #62
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
Bonus Point Triggers that disable after touch for 10 sec

Hello, I have a concmap I would like to release. I have some skill points that are trigger_ff_scripts. I would like it when any player passes through the trigger they get the points, then the trigger deactivates for say 10 seconds then reactivates....
Here is the code Bri was helping me with.


basescoretrigger = info_ff_script:new({
canscore = true,
score = 0,
})

function basescoretrigger:reallowscoring() self.canscore = true end

function basescoretriggerntouch(touch_entity)
if IsPlayer(touch_entity) then
local player = CastToPlayer(touch_entity)
if self.canscore then
player:AddFortPoints(self.score, "You have been awarded some points.")
BroadCastMessageToPlayer(player, "Nice Conc! You've been awarded some bonus points.")
self.canscore = false
AddSchedule("Reenable Scoring", 1, reallowscoring)
end
end
return true
end

beg_points = basescoretrigger:new({ score = 1 })
med_points = basescoretrigger:new({ score = 2 })
adv_points = basescoretrigger:new({ score = 3 })
crow_points = basescoretrigger:new({ score = 10 })



Any assistance would be awesome. Thanks,
m0f0
Jay Mofo Mills is offline   Reply With Quote