Jump to content

Slimwaffle

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by Slimwaffle

  1. thanks heaps guys I haven't added in distance check yet. But I got this working perfectly with two lines of code. My only question is now how do I get the position of the head instead. Because it uses the feet and prints the bar below the enemy. Or even if I got entity height somehow? these were the two lines I used. local p = self.entity:GetPosition() local y = player.camera:Project(p)
  2. 19648 polygons. Seems like a lot
  3. I have tried importing my own character. And attaching the default monster script. I loaded in animations and renamed them accordingly to interact with the script. However I am getting all sorts of random errors. And was wondering if someone could help. For this process I used fuse, mixamo and substance painter. First error is with meshing. When I create a material to apply the textures to my model.it doesn't let me apply textures to clothes and hair separately. The other issue is yes the character moves and the script appears to be working when selecting animations. But I get wild fps drop and stutter. And now the AI behaves erratic. Often stopping and doing nothing. The only thing I can think off is maybe slowing down the animation speeds. But I honestly don't know. Because they should work regardless of speed. Right now my dude has skin pants and his script and movement doesn't work properly. Is anyone able to help fix this? bandicam 2018-06-22 13-28-45-953.mp4
  4. I recently posted an updated FPS script with stamina and health bar. You could always tweak the code on that to get it the way you like. You could create extra bars for ammo, breath, xp and so on.
  5. Hi Guys I have found a FPS script with parkour stuff on the workshop. Not sure if that stuff works or not. I haven't tested it yet. But I made some modifications and want to make it available to everyone. New Features; Customizable Stamina and health bars. Shift and ctrl buttons that use stamina. ctrl makes the player crouch. For the Customizable bars. You want to create a border picture as a png and make the white space into transparent space. Then save it with the name Frame. Then create a folder in your project folder called "Frame". Then import your png into your Frame folder. Then right click your Frame.tex and edit. Then change your compression to DXT5. And this should work perfectly. Side note; I added in a variable called crouched for people to reference if they want to make a stealth system. Here is a screen for you guys. Showing what the bars look like. FPSPlayer.lua
  6. I am still not getting it for some reason. So I will explain what I did. I put the first piece of code into the Start() function. The second piece of code in my PostRender(context) function. Then I changed the line; u = Transform:Point(target:GetPosition(true),nil,entity) So that it now reads; u = Transform:Point(self.target:GetPosition(true),nil,entity) And I did all this on my Monster AI script. If I where to change target from a Vec3() to an entity. How would I do this? Because everywhere else in the code it is referred to as self.target
  7. I tried this and for the line; u = Transform:Point(target:GetPosition(true),nil,entity) I am getting an error for nil value for target. I think its because of the AI script only defining target once the AI has engaged you. Any suggestions?
  8. Hi Guys I have been working on my own game and I found a modified version of the FPSplayer script in workshop. And I have modified that script adding: Customizable health bar, Customizable Stamina bar, shift run script that uses stamina, and a working control button that crouches and uses stamina. All working without pivots. My question is what is the preferred method for sharing this free to everyone? Do I post the code in the forums? Do I submit to workshop? Or do I send the file to one of the Leadwerks staff to implement into the engine build? Its not finished yet. I still have other features I want to add. But I think its worth sharing at its current stage.
  9. thanks mate. I really appreciate the help. I will let you know how I go.
  10. Another approach I just thought of. Is it possible to draw at monsters position once engaged into combat if I merge this into monster ai script? So that the bar would appear over the monster. I look away and can't see it. And as I look back it stays over the monster.
  11. Hi guys. I just started working on a project and I am trying to make an enemy health bar. I attach the script to a pivot and make it a child of the enemy. And it works fine. What I need help with is for my if statement with the and condition. I want to do some kind of check against the FPS script as an extra and condition. To say if monster is within an amount of distance to the cross hair then draw to screen. --Player Enemy Health Bar-- Script.player = nil Script.EnemybarColor = Vec4() --color "Enemybar Color" Script.size = Vec2(0,0) --Vec2 "Size" Script.offset = Vec2(0,0) --Vec2 "Offset" function Script:Start() self.player = self.entity:GetParent() --Staminabar Fractioned local c = self.EnemybarColor self.EnemyColorFractioned = Vec4(c.x/255, c.y/255, c.z/255, c.w/255) end function Script:PostRender(context) if (self.player.script.health < self.player.script.maxhealth) and (self.player.script.health > 0) then --redefine values to make the script cleaner local a = self.player.script.health local b = self.player.script.maxhealth local c = self.EnemybarColor local e = a / b local ox = self.offset.x local oy = self.offset.y local sx = self.size.x local sy = self.size.y local p0 = self.player:GetPosition(true) --Background Bar context:SetBlendMode(1) context:SetColor(1,1,1,.25) context:DrawRect (context:GetWidth() - (context:GetWidth() / 2) + ox, (context:GetHeight() - (context:GetHeight() / 2)) + oy,sx,sy) --Draw the Enemybar context:SetBlendMode(0) context:SetColor(c) context:DrawRect (context:GetWidth() - (context:GetWidth() / 2) + ox, (context:GetHeight() - (context:GetHeight() / 2)) + oy, sx * e, sy) end end -- x axis use -(number) to offset, y axis use a positive number above 0
  12. So I was just wondering if there was a tutorial or something on how to edit existing prefabs in leadwerks. In a perfect situation I would like to import the crawler to blender make some changes then import to substance painter and make some more changes.
  13. Yes I was able to recreate bug using the demo.
  14. Ok changing the multi sample in the fps lua scipt fixes the camera for running the game. But I am having the same water texture issue as the hankinator. From above the water everything is pixelated and from underneath everything looks fine. Also I noticed that the option to change the water color in game isn't changing the color an awful lot.
  15. Yeah I'm on 4 and latest drivers and still no fix. Also now I am getting issues where when loading files are not found and shaders won't load. Is there any way to reset my LE4 so I don't have any workshop items. Just the base engine and the DLC I bought. For some reason when I fresh install it still lists all the workshop items I downloaded.
  16. Also I get the same bug when I add in water affect just on the water. If I turn off render lighting it goes away. But I can't see the water.
  17. Ok so I found something interesting. In the window where I click and drag items into the game I can force this glitch by turning anti aliasing off then fix it by making it x4 again. Is there a way I can change the anti aliasing settings for the window when I click run game?
  18. Is there any update on how to fix this bug. I have tried everything possible including changing all the settings for anti aliasing and all that stuff.
  19. Ok so how do I change this to work. Because atm I can take rendered screen shots but I can't test or debug game without error or add in water without error.
  20. Any update on this? I am still wating for a fix and can't test out project.
  21. yeah I got the latest driver and still no difference
  22. thanks that fixed the shader not working. I managed to roll back to previous updates and it didn't help. I think I might be getting these problems because I have upgraded my GPU and gone from nvidia to AMD. I can't run leadwerks without error on any of the builds.
  23. So how do I roll steam back to the previous version? Also I think one of the shaders isn't loading properly so I took screenshot of my output screen to show you.
  24. So far my experience is only in making open world environments. This kind of feels like it could be an issue with my new GPU and the driver. I only mention it because I recently went from a nvidia 2g card to an Amd r9 380 4g card. So it could be the new update is conflicting with my drivers.
×
×
  • Create New...