Skip to content

Commit

Permalink
Scroob ups: Attempt to fix explosive axtinguisher working with non-ax…
Browse files Browse the repository at this point in the history
…tinguisher hits
  • Loading branch information
mtxfellen committed Dec 10, 2024
1 parent 3b06bf4 commit c487a8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/population/custom_upgrades_scroob.pop
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ WaveSchedule
{
Name "Explosive Axtinguish"
Attribute "tool needs giftwrap"
Description "On hit with burning enemy, hit all enemies within a 300 hammer unit radius. Acts identically to hits with the weapon"
Description "On hit with burning enemy, every enemy within a 300hu radius of the victim will also be hit. Pulling out the axtinguisher right before a crit flare hits a victim will trigger this effect at range"
Cap 1
Increment 1
Cost 200
Expand Down
4 changes: 3 additions & 1 deletion scripts/scroob_custom_upgrade_hurt_listener.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AddEventCallback("player_hurt", function(eventTable)

local primary = attacker:GetPlayerItemBySlot(0)

if eventTable.bonuseffect == 1.0 and attacker:GetPlayerItemBySlot(2):GetAttributeValue("tool needs giftwrap", true) == 1 and attacker.m_hActiveWeapon.m_iClassname == "tf_weapon_fireaxe" then
if eventTable.bonuseffect == 1.0 and attacker:GetPlayerItemBySlot(2):GetAttributeValue("tool needs giftwrap", true) == 1 and attacker.m_hActiveWeapon.m_iClassname == "tf_weapon_fireaxe" and eventTable.damageamount > 40 then
print("That was an axtinguish")

--print(victim)
Expand Down Expand Up @@ -229,6 +229,7 @@ function scoutMechPrimaryCall(condition, caller, activator)
activator:AddHealth((125 - activator.m_iHealth))
end
if not activator:IsAlive() then
activator:SetAttributeValue("not solid to players", 0)
return
end

Expand Down Expand Up @@ -305,6 +306,7 @@ function scoutMechPrimaryCall(condition, caller, activator)
giantBodyDummyExplode:AcceptInput("Stop")
giantBodyDummyExplode:Remove()
giantBodyDummyExplodeSound:Remove()
activator:SetAttributeValue("not solid to players", 0)
end)
end)
end
Expand Down

0 comments on commit c487a8f

Please sign in to comment.