Ramibuk Posted November 1, 2013 Share Posted November 1, 2013 I tried that like this ,but its wrong:local square= getPlayer():getSquare();square:StartFire(); Link to comment Share on other sites More sharing options...
Ramibuk Posted November 2, 2013 Author Share Posted November 2, 2013 No answer...i heard talk that fire is disabled for now and i didnt see any in game so i take it as its true then. Link to comment Share on other sites More sharing options...
EnigmaGrey Posted November 2, 2013 Share Posted November 2, 2013 Fire is working fine; There's probably a little bit more to it than that, though. That could even just set a boolean to true somewhere rather than actually start a fire. Note, this is not done through Lua: Link to comment Share on other sites More sharing options...
Ramibuk Posted November 2, 2013 Author Share Posted November 2, 2013 I saw this here http://projectzomboid.com/blog/2012/01/expanded-modding-support-details/ in expoding apple example if sq ~= nil thensq:StartFire(); Full function:function DoExplodingApple(character, item) if item:GetType() == "Apple" then local radius = 30; local numFires = 300; local cell = GetWorld():GetCell(); local objects = cell:GetObjects(); for k,v in ipairs(objects) do if character:DistTo(v) < radius and v:IsCharacter() then v:Kill(character); end end GetSoundManager():PlayWorldSound("explode", character:GetSquare(), 0, 20, 1.0, false); for i = 0, numFires do local sq = cell:GetGridSquare(ZombRand(character:GetX()-radius, character:GetX()+radius), ZombRand(character:GetY()-radius, character:GetY()+radius), character:GetZ() ); if sq ~= nil then sq:StartFire(); end end endendEvents.OnUseItem.Add(DoExplodingApple); but that's from january 2012 so i was interesting how fire work now Link to comment Share on other sites More sharing options...
Stormy Posted November 3, 2013 Share Posted November 3, 2013 There's a public static class called IsoFireManager... you could try IsoFireManager:StartFire(IsoCell cell, IsoGridSquare gridSquare, boolean IgniteOnAny, int FireStartingEnergy) Can't remember the exact methods but I guess it would be something like:IsoFireManager:StartFire(getPlayer():getGridSquare():getCell(), getPlayer():getGridSquare(), true, 10) Ramibuk 1 Link to comment Share on other sites More sharing options...
Ramibuk Posted November 17, 2013 Author Share Posted November 17, 2013 Thanks Stormy this is right path as it didnt throw me errors and actually did something,but its not fire yet.I guess i need set few more things before i will see a fire. Link to comment Share on other sites More sharing options...
Ramibuk Posted November 17, 2013 Author Share Posted November 17, 2013 Thanks to Stormy: gridSquare:AddTileObject(IsoFire.new(gridSquare:getCell(), gridSquare, true, 2)) Not sure what that end number is for and the fire seems to spawn long after I call the function but that definitely does add a fire to a square. 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