lucas_risada Posted July 25, 2017 Share Posted July 25, 2017 I want to program a chainsaw but I don't know how to make it deal damage to the trees. I don't want it to behave like an axe, I want it to deal constant damage over time when I am close enough to a tree. Any ideas? Link to comment Share on other sites More sharing options...
Yabumi Posted July 29, 2017 Share Posted July 29, 2017 Are you saying you want it to have an "aura" effect which damages trees within range? If so, the game's aura should be good enough if you make it decrease health on anything with a "tree" tag (I think that's the tag). Just make the chainsaw add the aura on equip and remove it on unequip. If you mean doing it via click action, then you can use a time check (last_damaged or something) with a custom action bound to the mouse. This would involve an action, a component action and a stategraph. The actual behavior for the cutting would then be placed in a component that's assigned to your chainsaw. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.