Sea Weeds that are caught on fire(any fire) will attack the player, even if it was just a wildfire.
local function on_ignited(inst, data) -- Would be nice to use data.doer, but very few places seem to pass it! -- So just set the closest player as a target and assume they lit us up. find_and_attack_nearby_player(inst) inst.components.harvestable:Disable() end
I noticed there were these comments, and it is understandable to assume a player may have lit up a Sea Weed, considering most of the time a spittlefish will likely be there to stop any smoldering, the smoldering can still happen even if it was not caused by player interference. So it's a bit of a dangerous assumption to assume the closest player lit up the Sea Weed, perhaps it would be best to just go ahead and pass data.doer in all "onignite" events rather then dancing around the issue and assuming a nearby player lit the Sea Weed up?
1. Let a sea weed be caught on fire by a wildfire/smoldering(c_select().components.burnable:StartWildfire())
2. Notice it just aggroes onto the nearest player.
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
Already have an account? Sign in here.Sign In Now