Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. Best guess is that the color is not being set via whichever shader is being applied to them. What shader is being applied to it? Is it the latest version of inherent LE shaders or is it a custom shader?
  2. It is working for me. EDIT- This character does have a small scale applied to it (0.011,0.011,0.011) which in the past this would have caused numerous issues when parenting. But it looks like Josh changed the global parameter for the SetParent() command to only affect orientation instead of the child inheriting the parent's matrix (like it was done in LE2). I believe this is a recent change because i remember distinctly having scaling issues due to the parent's scaling this past year. Nope- still changes the scaling if the global parameter is set to false. The child's scale will be multiplied by the parent's scale. The information in the API Reference is incorrect as it implies only the rotation/position would be affected.
  3. Just looking at your updated code, nothing is jumping out as the issue since you resolved the 'nil' variable. Would likely need to see the character itself to test. You do not by chance have either of these models (character or shield) scaled to something other than (1,1,1)? It would not be the first time I have seen parenting issues due to extreme scaling problems. --Edit: just tried your code in the first post with some small edits for removing the nil variable and loading my own models, and I noticed that the "shield" is getting loaded when the scene starts - not when you press the "Enter" key. Is that what you wanted? In any case, the above code in general works as I applied it to a crawler model with a cagelight as the shield attached to the left hand bone. My guess is that would need to see the models in question to determine the issue. Scaling is suspect.
  4. Without seeing the model in question to try myself, I am just going to guess that it has something to do with these two lines: self.leftHandShield = self.entity:FindChild("mixamorig:LeftHand") ... self.shields.shield1:SetParent(self.leftHandShield[0]) The variable 'self.leftHandShield' is not equal to the 'self.leftHandShield[0]' variable. So it appears you are setting the parent to nil which would explain why it does not follow. For future reference, the '[#]' denotes an item in an arrayed/tabled variable. So just make the line this and it should work: self.shields.shield1:SetParent(self.leftHandShield)
  5. according to the motherboard manufacture: http://www.gigabyte.com/support-downloads/faq-page.aspx?fid=816 Graphic card error 1 long beep and 3 short beep
  6. When you created your project, did you choose the FPS Template or did you choose the Blank Project? If you chose the Blank Project, it will not have the player prefab as its a blank project. If you create a new project and select the FPS template, then you will find the fps player prefab in the Assets folder location: 'Prefabs/player/FPSPlayer.pfb' EDIT -- another way to do it if you already have a fps template project but want the player prefab in the blank project, just copy the required files via windows explorer into the blank project. http://www.leadwerks.com/werkspace/page/tutorials/_/project-manager-r31#section1
  7. http://www.leadwerks.com/werkspace/topic/15437-heat-haze-particles-incompatible/#entry103484
  8. Regarding #2, according to the steam post the issue is fixed? Without seeing example code that causes this issue one can only guess what the issue could be. Does he have multiple monitors or anything? I cannot get it to screw up when switching from windowed to fullscreen in any of my examples.
  9. If the hurt function is being driven by a collision then it probably is being added multiple times. A system print would determine this. But the code you are showing will mean the same effect would be added each time the Hurt function is called and the player health is below 50. You need to add a boolean check to see if the post effect has already been added and to prevent it from being added multiple times. if self.health<50 and self.postadded=="false" then self.camera:AddPostEffect("Shaders/PostEffects/radiation.shader") self.postadded = true end function Script:CameraFix() if self.health>50 and self.postadded=="true" then self.camera:RemovePostEffect(0) self.postadded = "false" end end
  10. Is that radiation post effect only being added once or is it being added multiple times when the player health is below 50? Just curious because the code above implies you are constantly adding the same effect to the camera effect stack. Not quite sure why CleatPostEffects() is causing the scene to bleed but you could try to use the RemovePostEffect() command. Assuming you are only adding this one post effect to the stack then you could remove it via its number in the stack. self.camera:RemovePostEffect(0) Looking at this now - it would be helpful if Josh gave us a way to count the number of post effects in the stack. Something like 'camera:CountPostEffects()'?
  11. http://www.leadwerks.com/werkspace/blog/1/entry-1835-visual-studio-2017-not-ready/
  12. The video you posted indicates it is the mouse, its drivers, the mouse settings in windows, or a combination of those. Quick google search shows numerous issues with windows 8 and high dpi mouse users across a wide variety of applications and games. Suggested fixes include updated drivers for the mouse, disable the display scaling on high DPI settings, turn off enhance pointer precision or mouse sensitivity, etc...
  13. I even tried to get the original GUI example to work and it fails to draw the button: http://www.leadwerks.com/werkspace/blog/1/entry-1714-leadwerks-gui/
  14. Agree. Either applying the gradient or adding a radius will draw the rectangle incorrectly. window=Window:Create("example",0,0,600,400,window.Titlebar+window.Center) context=Context:Create(window,4) world=World:Create() camera = Camera:Create() while window:KeyDown(Key.Escape)==false do if window:Closed() then break end Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:SetColor(1,0,0,1,0) context:SetColor(1,1,0,1,1) context:DrawRect(100,100,400,200,0,5) context:SetGradientMode(true) context:SetBlendMode(Blend.Solid) context:Sync(true) end And if doing gradient only:
  15. http://www.leadwerks.com/werkspace/topic/14784-gui-update/#entry100393
  16. Look at the material for anything that is being used as vegetation. I suspect you are missing a shadow shader somewhere. For Example: http://www.leadwerks.com/werkspace/topic/14178-dark-shadow/#entry97265 and http://www.leadwerks.com/werkspace/topic/14726-dlc-oak-tree-shadow/#entry100102 and http://www.leadwerks.com/werkspace/topic/14744-objects-get-strange-tree-like-shadows/#entry100217
  17. --EDIT I ran into this before and it looks like the issue is the emitter's animation columns and rows are being set to 1 no matter what is set in the prefab. The way I have been able to get around this bug is by attaching a small script to the emitter that sets the columns and rows. function Script:Start() self.entity:SetAnimationColumns(6) self.entity:SetAnimationRows(6) end The below picture shows a emitter with the above script saved as a prefab and a emitter without the script saved as a prefab loaded into the scene.
  18. Along those lines, I am hoping that the beta version that has Steam being initialized whether or not its actually in your main.lua script is not something that will be permanent. In the standard main lua script, it is commented as 'optional' and right now its not.
  19. Also, just load the "loading font' once as well. font = context:GetFont() loadingFont = Font:Load("Fonts/arial.ttf",42) loadingText = "L O A D I N G . . ." function LoadingScreen() context:SetBlendMode(Blend.Alpha) context:SetFont(loadingFont) local x = (window:GetWidth() / 2) - (loadingFont:GetTextWidth(loadingText) / 2) local y = (window:GetHeight() / 2) - (loadingFont:GetHeight() / 2) -- Fill screen with black context:SetColor(0, 0, 0) context:DrawRect(0, 0, window:GetWidth(), window:GetHeight()) -- Draw "Loading" text context:SetColor(1, 1, 1) context:DrawText(loadingText, x, y) context:SetFont(font) context:Sync(false) end LoadingScreen() When I do this and what I showed above for changing maps, I get the same memory usage each time I load the same map instead of it increasing each load. EDIT --Actually just load the font separately and one time like shown above and you can still keep the hook function in the Map:Load(). But since you are just drawing a static text/image there's no reason to do this as there is no reason to update per entity being loaded. If you were doing some kind of progress bar or dynamic text, then you would want to use the hook option.
  20. A leak would imply its continually increasing. The problem is with what you are doing with the hook. You are loading the font every time an entity is loaded from your map. Just call the loading screen function separately (and one time) if the map is changed then perform Map:Load(). ... --in the main loops check for the changemapname ... LoadingScreen() if Map:Load("Maps/"..changemapname..".map")==false then return end ... ...
  21. macklebee

    Dev Stuff

    it better be globally tesselated or its garbage!
  22. void semicolon semicolon void void ;;;;;;; [ cpp ]void semicolon semicolon void void ;;;;;;;[ / cpp ] ^remove the spaces in the brackets
  23. That seems odd? For it to be available in lua typically means its in c++ version and ported to lua.
  24. what's the code for rounded corners?
  25. er... i thought we had this already? does it not work?http://www.leadwerks.com/werkspace/blog/1/entry-1712-improved-2d-drawing-command-set/ Edit-- It appears to be working at least in the beta window = Window:Create("example",0,0,600,400) context = Context:Create(window) world = World:Create() light = DirectionalLight:Create() light:SetRotation(45,45,0) camera = Camera:Create() camera:SetPosition(0,0,-3) box = Model:Box() box:SetColor(1,0.5,1,1) while not window:KeyHit(Key.Escape) do if window:Closed() then return false end box:Turn(0.5*Time:GetSpeed(),0.5*Time:GetSpeed(),0) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:SetColor(1,0,0,.5) context:DrawRect(2,2,300,100) context:SetColor(1,0.5,0,.5) context:DrawRect(302,2,300,100) context:SetColor(1,1,1,1) context:DrawText(camera:GetPosition():ToString(),2,2,300,100,Text.Center) context:DrawText(camera:GetPosition():ToString(),302,2,300,100,Text.VCenter+Text.Center) context:SetBlendMode(Blend.Solid) context:Sync(true) end
×
×
  • Create New...