Mitzimber Posted March 21, 2017 Share Posted March 21, 2017 Hello! I am working on a water elf character mod for dst, and I was wondering: 1. How do I make a healing aura? I would like her to emit a healing aura, so she is a more supportive character. 2. How do I make a growing aura? By this I mean, how do I make her emit an aura that allows plants/farms near her to grow faster while she stands near them? Thanks a bunch, in advance. Link to comment Share on other sites More sharing options...
CarlZalph Posted March 21, 2017 Share Posted March 21, 2017 5 hours ago, Mitzimber said: Hello! I am working on a water elf character mod for dst, and I was wondering: 1. How do I make a healing aura? I would like her to emit a healing aura, so she is a more supportive character. 2. How do I make a growing aura? By this I mean, how do I make her emit an aura that allows plants/farms near her to grow faster while she stands near them? Thanks a bunch, in advance. Both things would be done with your character's master_postinit callback to contain a periodic timer for polling. The growth aura would be a bit involved as to what you'd want to grow faster. A lot of prefabs have their own type of components used and handle differently. Check out data/scripts/prefabs/books.lua's trygrowth function. This is the function used to make things grow when using Wickerbottom's book, and you might be able to see what sort of components you'd be wanting to look for for your character. Here's a simple health regen one to give 1hp/5s to all players within 4u(1turf), including the character itself: inst:DoPeriodicTask( 5.0, function(inst) local x, y, z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, 4.0, {"player"}, {"playerghost"}) for _,v in pairs(ents) do v.components.health:DoDelta(1) end end ) Note that hp regen is very powerful in this game and can be easily overpowered, especially if it's always on. Link to comment Share on other sites More sharing options...
Mitzimber Posted March 23, 2017 Author Share Posted March 23, 2017 Great, thanks. And noted, as well. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now