WaveSchedule { PointTemplates { giant_medic_healrate { NoFixup 1 OnSpawnOutput { Target Healing_Check // Activates the logic relay below, which triggers itself and does a few very important things Action Trigger } logic_relay { "targetname" "Healing_Check" "spawnflags" "2" "ontrigger" "filter_heal,$testentity,@c@!activator,0,-1" // TF2 weapons are considered "children" of players, this checks for what weapon the medigun is spawned on "ontrigger" "Heal_Format,$format,,0.01,-1" // Makes the "ontrigger" "heal_count,GetValue,,0.01,-1" "ontrigger" "!self,trigger,,0.1,-1" } $filter_sendprop { "targetname" "filter_heal" "$name" "m_bHealing" "$value" "1" "$compare" "equal" "onpass" "heal_count,add,1,0,-1" } $filter_sendprop { "targetname" "filter_heal" "$name" "m_bHealing" "$value" "1" "$compare" "less than" "onpass" "heal_count,subtract,20,1.5,-1" } OnSpawnOutput { Target heal_count Action SetValue Param 1 } math_counter { "targetname" "heal_count" "max" "500" "min" "1" "OnGetValue" "heal_count,$SetVar$CurrentValue,,0,-1" "OnGetValue" "player,$AddPlayerAttribute,$$='heal rate bonus|'..heal_count.CurrentValue,0,-1" "onhitmax" "Heal_Format,$setkey$case16,Heal Rate: %/500,2,-1" "outvalue" "Compare_Heal,setvaluecompare,,0,-1" "outvalue" "Heal_Format,$setkey$case01,,0,-1" } logic_compare { "targetname" "Compare_Heal" "comparevalue" "0" "onequalto" "Heat_Formal,$setkey$case16,Heal Rate: %/500,0,-1" "ongreaterthan" "Heal_Format,$setkey$case16,Heal Rate: %/500,-1" } logic_case { "targetname" "Heal_Format" "case16" "Heal Rate: %/500" "ondefault" "Heal_Text,$setkey$message,,0,-1" "ondefault" "Heal_Text,display,0,0,-1" } game_text { "targetname" "Heal_Text" "color" "255 0 274" "holdtime" "2" "spawnflags" "0" "channel" "2" "x" "0.45" "y" "-0.70" } } } PlayerItemEquipSpawnTemplate //Spawn custom player template, If a weapon is equipped { Name giant_medic_healrate Classname "TF_WEAPON_MEDIGUN" } ItemAttributes { Itemname "TF_WEAPON_MEDIGUN" "special item description" "Healing patients will increase the heal rate. '1' on the Heal Rate meter equals 100% heal rate bonus." } }