shadmar Posted May 1, 2014 Share Posted May 1, 2014 Josh's animated waternormals : http://steamcommunity.com/sharedfiles/filedetails/?id=239702606 Script.Material = ""--path function Script:Start() self.textures = { } -- Fetch workshop animated water normals for x=0,9,1 do local name = "water1_0"..x..".tex" self.textures[x] = Texture:Load(name,0,239702606) end for x=10,63,1 do local name = "water1_"..x..".tex" self.textures[x] = Texture:Load(name,0,239702606) end -- Load material self.mat = Material:Load(self.Material) self.entity:SetMaterial(self.mat) self.index=0 end function Script:UpdateWorld() -- Animate normals for texture1 for material if self.index > 63 then self.index=0 end local count = 0 self.index=self.index+Time:GetSpeed()*0.5 count=math.floor(self.index) self.mat:SetTexture(self.textures[count],1) end Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
bandrewk Posted May 2, 2014 Share Posted May 2, 2014 The item is either marked as hidden or you do not have permission to view it. Quote Link to comment Share on other sites More sharing options...
MexSource Posted May 2, 2014 Share Posted May 2, 2014 me too Quote C++ :3 Link to comment Share on other sites More sharing options...
Josh Posted May 2, 2014 Share Posted May 2, 2014 If you have a friend in the group on Steam, they can invite you. You don't even need to subscribe to the package, it will just be downloaded automatically when you make that call. (Requires the latest beta.) Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SlipperyBrick Posted May 2, 2014 Share Posted May 2, 2014 -- Load material self.mat = Material:Load(self.Material) self.entity:SetMaterial(self.mat) What material is this loading? I don't understand how these water animations work Quote Link to comment Share on other sites More sharing options...
Rick Posted May 2, 2014 Share Posted May 2, 2014 self.Material is the same as Script.Material at the top of the script which is a parameter to the script. You fill that in from the editor with whatever material you want that's in your project folder. So you attach this script to anything (a plane I would guess would be best) and assign that Material parameter which will show up in the editor when you attach the script. 1 Quote Link to comment Share on other sites More sharing options...
shadmar Posted May 2, 2014 Author Share Posted May 2, 2014 I'm "upgrading" the old water prefab to use these instead, this example was just my excercise to load workshop items. But uf you just use the concrete material in my example above on a simple CSG brush, it will look like very very very shallow water on conrete for example. 2 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.