Jump to content

How can I add a damage aura to my custom survivor?


Recommended Posts

You'd probably want to do a periodic loop where you find all the entities with a health (probably combat too) tag, and damage them. 

Very rough example:

player:DoPeriodicTask(time, function()
    local victims = TheSim:FindEntities(...) 
    for i,v in pairs(victims) do
      -- you can either attack by doing it through Health:DoDelta or Combat:GetAttacked. Health is the simplest way since it ignores game mechanics, Combat:GetAttacked accounts for game mechanics (armor, aggro, etc)
      end
end)

You can find examples of TheSim:FindEntities in the game files.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...