Jump to content

Slimwaffle

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by Slimwaffle

  1. 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?
  2. 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.
  3. thanks mate. I really appreciate the help. I will let you know how I go.
  4. 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.
  5. 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
  6. 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.
  7. For some reason whenever I try to add new addons steam says it downloads them but I can't locate them in the addons folder. And leadwerks can't find them. The adds I already had are working but any new ones I try to add are not
  8. I was following the project Saturn tutorials on how to create an in game inventory. And I followed it doing exactly what he said but I get an error. 76 : attempt to index local 'currentItem' (a boolean value) Can someone please help? I'll attach the 2 scripts I am using. Also here are the links to the tutorial vids in case it helps. http://steamcommunity.com/sharedfiles/filedetails/?id=319799499 Inventory.lua InventoryItem.lua
  9. thanks heaps mate. I'll give these a go in the morning.
  10. I ended up using gimp. I offset the texture then used the clone brush to paint over the seams.
  11. I was wondering if anyone could tell me how to or point me in the direction of a good tutorial. I need to know how to remove seams from Skybox textures and format the file so various parts o the texture align. Also is there a way to make my file render in higher detail. I'll attach a picture for some reference. All the tutorials I have found have been for unity.
  12. thanks I'll try this out and let you know how I go.
  13. I am planning on writing some code for a project I am working on and before I start I was just wondering if its possible to have my code change a texture file after so many seconds have passed. Without posting actual code I was thinking along these lines. create sky items day, dawn, dusk and night. Get info from Skybox item, After so many seconds get dawn texture. Return dawn texture to skybox item. Rinse and repeat for full cycle using my own custom textures. Would this way of thinking be ok using the skybox already implemented in leadwerks or would I need to create a new skybox script? Or has anyone already done this that could give me some advice on how to achieve this? And could I do the same to a player character so that after so many seconds skin becomes sunburnt and clothes become dirty.
  14. Thanks for the help guys. Managed to fix it.
  15. So I was fiddling around and made a texture but I was wondering if anyone could help explain how to take out the join lines. I will attach a picture so you can see what I am talking about.
  16. Thank you so much for your help. My skin texture was fixed using your method. And I figured out my animations wouldn't work because miximo saves them as .fbx files. And with the day/night thing there is no download button and when I checked shadmar's files from his profile this file is not listed.
  17. So I have been dabbling a little with leadwerks, Fuse character creator, substance painter and blender. I seem to be picking every thing up fairly quickly. I have about 1 year of java experience (Yet none working on game developing). I have come across some problems I could use some hep with. So I made basic character using fuse and added the textures to each material (in leadwerks) for the character (body, shirt, jeans etc.). However the textures for the body get jumbled and her eyes mouth end up on her arm. How do fix this? Ohh I also have animations for the character but can't find a window to attach them. Do I need to write another script to attach each animation to the character. Or possibly add them to a fps player script and modify it to act as a npc. And lastly for a day and night cycle. Is there an in-built feature or do I need to make sun object and write the scripts myself?
×
×
  • Create New...