Animated texture on node

Nekrofage
Member
 
Posts: 35
Joined: Mon Oct 17, 2016 21:12
GitHub: Nekrofage

Animated texture on node

by Nekrofage » Thu Dec 15, 2016 22:23

Hi !!

I search an simple example of animated texture on node, do you have something like that ?

Thanks you ! :D
 

User avatar
Christian9
Member
 
Posts: 273
Joined: Fri Sep 19, 2014 20:29
In-game: Christian9

Re: Animated texture on node

by Christian9 » Thu Dec 15, 2016 23:19

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("mod_name:node_name", {
   description = "desc",
   drawtype = "drawtype",
   tiles = {
      {
         name = "name_animated.png",
         animation = {
            type = "vertical_frames",
            aspect_w = 16,
            aspect_h = 16,
            length = 2.0,
         },
      },
   },
   special_tiles = {
      {
         name = "name_animated.png",
         animation = {
            type = "vertical_frames",
            aspect_w = 16,
            aspect_h = 16,
            length = 2.0,
         },
         backface_culling = false,
      },
   },


Try downloading the game default "mods" on github and modifying the animated water texture
"I dreamed of becoming a scientist, in general, and a paleontologist, in particular, ever since the Tyrannosaurus skeleton awed and scared me" - Steven Jay Gould

My Deviantart Page
My Website
 

User avatar
cx384
Member
 
Posts: 249
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: Animated texture on node

by cx384 » Sat Dec 17, 2016 20:20

Can your read this?
 

Nekrofage
Member
 
Posts: 35
Joined: Mon Oct 17, 2016 21:12
GitHub: Nekrofage

Re: Animated texture on node

by Nekrofage » Sun Dec 18, 2016 22:21

Hi all !!

Thank your help ! :D

This is my code :
https://github.com/Nekrofage/animtex
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 46 guests

cron