Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. is this psuedo-code? or are you asking why it is not working? if health>=1 and health <25 then hudText = "Critical" elseif health>=25 and health<50 then hudtext = "Caution" elseif health>=50 and health<75 then hudText = "Injured" elseif health>=75 then hudText = "Fine" end
  2. The only crash i get is when I melee the boxes. But I can see if i let this run for awhile there will be issues as the script memory is just constantly rising even when not doing anything. My guess that the issues are somewhere inside the 3 separate player entities with their own scripts you have sitting ontop of each other?
  3. are the trigger and magazine bones or just other sub meshes in the model? hmmm - if you post the model, i think uu3d can convert it properly to something LE can use. But other than that you would need to place bones in the model and set the keyframes based on their PRS.
  4. You have to manage your fonts just like any asset. window = Window:Create("font example",0,0,400,300) context = Context:Create(window) world = World:Create() camera = Camera:Create() light = DirectionalLight:Create() light:SetRotation(45,45,0) box = Model:Box() box:SetPosition(0,0,3) box:SetColor(1,0,0,1) lilfont = context:GetFont() medfont = Font:Load("Fonts/arial.ttf", 24, Font.Smooth) bigfont = Font:Load("Fonts/arial.ttf", 48, Font.Smooth) while window:KeyDown(Key.Escape)==false do if window:Closed() then break end box:Turn(Time:GetSpeed()*0.5,Time:GetSpeed()*0.5,0) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText(string.format("FPS: %.2f",Time:UPS()),0,10) context:SetFont(bigfont) context:DrawText("BIG FONT",0,30) context:SetFont(medfont) context:DrawText("MEDIUM FONT",0,80) context:SetFont(lilfont) context:SetBlendMode(Blend.Solid) context:Sync(true) end
  5. Agree that the default style should be turned back to Font.Smooth. In the meantime while waiting for this to be changed back, just set the style to smooth when you load your font. https://www.leadwerks.com/docs?page=API-Reference_Object_Asset_Font_Load
  6. Canardian/megatron/mika/cant-remember-previous-name was well known for making "strong statements" about everything that typically resembled what people nowadays call "alternative facts". So don't take anything posted by him to heart.
  7. You don't need to create a camera at all when you are using the player with the fpsplayer.lua script. That script creates a camera. Just delete the default camera.
  8. The entity must have character physics mode to use the navigation commands.
  9. Have you followed the steps described in the tutorial? https://www.leadwerks.com/docs?page=Tutorials_Games_First-Person-Shooter_Character-Controllers Does the character have mass, does it have the fps script attached, etc?
  10. Set the groundrocks shader as the vegetation shader in your model's material file.
  11. That only happens when you have the base model and all of its children selected. Just click the parent / base model in the Scene tab. A quick way to tell if you have more than just the object / asset selected will be if the Name property value is '<different>' instead of the object / asset's name.
  12. When you moved your old files into the new project, did that include the old newton.dll? It appears the latest beta has updated newton libraries.
  13. Why would the variable get set to nil unless you program it? I assume you didn't write anything in the function 'Script:Cleanup()'. https://www.leadwerks.com/docs.php?page=Tutorials_Lua-Scripting_Introduction-to-Lua# This function is called when every single instance of the script is detached, and the script is no longer in use. You can use this to delete any shared resources the script uses.
  14. Do exactly what I, marcousik, and gamecreator posted. Apply the animation to the model in Mixamo and then export the animation as FBX with SKIN. You will end up with several single sequence animated meshes. Use the LE Model Editor to load the animations onto your base model, save the file, and then party.
  15. well... kinda. There are a lot of caveats to that when using models and animations from mixamo. Mixamo used to rename bones depending on if its a skinned animation or not, and at one point had added root bones. Leadwerks will only allow you to load animations onto an existing rigged model that has the exact same bone names and hierarchy. The solution i found to be the easiest is to apply the animation to my model in mixamo then export it as a skinned animation. Then I can load the animation onto my base model in the LE Model Editor. Other than that, you are left going through renaming the bones by hand to get them to match.
  16. This has worked for several other people with different modeling apps over the years.
  17. 1) The shadow shader you are looking for is the Shaders/Model/Shadow/shadow+alphamask.shader 2) Its difficult to understand the problem you are showing - it could very well be an issue with the model. May need the actual model to understand the problem.
  18. odd - it stopped working for me last week as shown in the original bug report and by updating tonight it works just fine now.
  19. LE2 had the ability to do project transparent colored shadows, but unfortunately its a feature that Josh believes no one would ever use in LE4. You could fake it by applying a material to a spotlight or a sprite.
  20. Have you updated the latest iteration of 4.4? There's been an update that fixed this. Just tried it and it works.
  21. The other window styles available work just fine, but for some reason 'Window.FullScreen' or 'Window.Fullscreen' no longer works. It errors whenever the variable 'window' is used after it fails to create the window due to the fullscreen style not working any more.
  22. If you are running it through the editor then steam will be initialized even without it in the main script, and the steam pics page will show up since the LE editor is a steam "game".
  23. This command IS available for lua.
×
×
  • Create New...