Help with some code

User avatar
GamingAssociation39
Member
 
Posts: 819
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Help with some code

by GamingAssociation39 » Fri Jun 22, 2018 04:32

So I'm trying to figure out how to make the arrow (item_percent) to work with my node. The node doesn't have any fuel. It's written in a way that it's similar but very different than the furnace can anyone help?
Last edited by GamingAssociation39 on Fri Jun 22, 2018 14:10, edited 2 times in total.
Jesus Is Lord and Savior!!!
 

User avatar
Pyrollo
Member
 
Posts: 325
Joined: Mon Jan 08, 2018 15:14
Location: Paris
GitHub: pyrollo
In-game: Naj

Re: Modding Help!!!

by Pyrollo » Fri Jun 22, 2018 08:09

Why don't you have a look to furnace code ?
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
 

User avatar
Pyrollo
Member
 
Posts: 325
Joined: Mon Jan 08, 2018 15:14
Location: Paris
GitHub: pyrollo
In-game: Naj

Re: Modding Help!!!

by Pyrollo » Fri Jun 22, 2018 08:12

Please, put a more explicit title. In "Modding discussion" most of the topics are for asking "modding help".

(I feel like, I woke up in bad mood today :D )
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
 

User avatar
GamingAssociation39
Member
 
Posts: 819
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: Modding Help!!! (Help Wanted)

by GamingAssociation39 » Fri Jun 22, 2018 14:09

Code: Select all
--Adding arrow animation
local function item_percent (pos, elapsed)
   local cookable = microwave.register_recipe
   
   if cookable then
      item_percent = math.floor(src_time / cooked.time * 100)
      if item_percent > 100 then
         item_state = "100% (output full)"
      else
         item_state = item_percent .. "%"
      end
end


Is this plausible? Would this work? The node I'm trying to add the item_percent uses 0 fuel that's why I'm asking for help with this.
Jesus Is Lord and Savior!!!
 

User avatar
GamingAssociation39
Member
 
Posts: 819
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: Help with some code

by GamingAssociation39 » Thu Jul 12, 2018 03:01

I was able to get help with the code above.
Jesus Is Lord and Savior!!!
 

User avatar
GamingAssociation39
Member
 
Posts: 819
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: Help with some code

by GamingAssociation39 » Thu Jul 12, 2018 03:03

I'm now needing help with some code regarding a mod loading some files and images using Github how would I do so?
Jesus Is Lord and Savior!!!
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 3 guests