Slayer Posted December 7, 2023 Share Posted December 7, 2023 (edited) Hi I'm trying to make a mod whee players could replant various plants and bushes naturally found in the world. Here is where I got stuck: after I add a bush as IsoObject to the IsoSquare, the plant is static and does not follow erosion rules. I understand that the plant has its base sprite and depending on season and other aspects there are more sprites that are attached to the plant, like leafs, fruits etc. This happens automatically for all plants that spawn naturally in the game, but not for plants I create. My research points to ErosionData that is sometimes set for a square. I know that I can read it by getErosionData, but I don't know how to set it thought. Additionaly even if I create a bush on a square that has erosiondata (for example by planting a bush on a square where I previously removed a bush), the plant still won't live. Can someone point me to the correct way of creating living plants? here is the test code: local plantObj = IsoObject.getNew(self.square, "f_bushes_1_12", "Blackberry", false) self.square:getObjects():add(plantObj) plantObj:addToWorld() -- also tried: -- self.square:AddTileObject(plantObj) Edited December 7, 2023 by Slayer formatting 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