Jump to content

Haydenmango

Members
  • Posts

    434
  • Joined

  • Last visited

Everything posted by Haydenmango

  1. Hey everyone! I made a Ammo Pickup Script that is compatible with the FPS pack that just came out. Just place the Ammo Pickup.lua on a model and while playing look at the ammo model and click E to pick up ammo. There are two changeable values for the amount of ammo and for the type of ammo you pickup. Here are what the default ammo types are - 1 - Autopistol (Pistol that comes with Leadwerks, if you aren't using the machete) 2 - Pistol 3 - Shotgun 4 - MP5 5 - M4 To see your Ammo amount you can add this into your FPSplayer.lua under the PostRender(context) function - if self.weapons[self.currentweaponindex]~=nil then context:DrawText("Ammo: "..self.weapons[self.currentweaponindex].clipammo.."/"..self.weapons[self.currentweaponindex].ammo,context:GetWidth()-100,context:GetHeight()-100) end Ammo Pickup Script - https://www.dropbox.com/s/vdgy70rtmlnrex2/Ammo%20Pickup.lua?dl=0 FPS Pack - http://store.steampowered.com/app/329100/ Extra! - Med Pack Script - https://www.dropbox.com/s/jh36dtoj06ypxlz/Med%20Pack.lua?dl=0 Let me know if there are any issues and I hope this helps! Extra thanks goes out to Imchasinyou for testing these scripts with me. Edit-- I forgot to mention one very important thing! You need to add - Script.maxammo=200 --int "Max Ammo" into the FPSgun.lua
  2. I updated the script so you can choose between clicking ctrl to crouch or holding ctrl to crouch. https://www.dropbox.com/s/rbh1iof5qubss78/Edited%20FPSplayer.lua?dl=0
  3. Did you place your camera into the Camera box under your Characters Script Tab? edit---waiiitttt I found the problem, line 152-153 change --self.camera = Camera:Create() self.camera = self.Camera to self.camera=Camera:Create()
  4. Ok, just looked over your script and it looks like you just need to change - Script.Camera=nil to Script.camera=nil Capitalization can change everything! edit-- Also you will need Script.crouched=false Script.crouchedheight=.9 --float "Crouch Height" at the top of your script for crouching.
  5. The Terrain functions have no documentation. I would like to see them documented because I can't get half of the functions to work and it is a pain trying to figure it out.
  6. Well line 646 is local pickUpX = math.floor((context:GetWidth() - self.image.hand:GetWidth()))/2 for me so that doesn't make any sense. Have you edited the script at all? Also if you go to your characters Script tab is the Crouch Height value equal to a number?
  7. No Problem, I am glad to help! Yep, that is where you can change the Key that activates/deactivates Crouching. Thanks for pointing that out I am sure others will find that useful. Lines 605-610 are the lines that actually make the camera move to your crouch height and I also changed line 599 from - self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , false, 1.0, 0.5, true) to - self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , self.crouched, 1.0, 0.5, true) to activate the Character Controllers crouching function.
  8. Lots of people ask me to help them get crouching to work so I edited the FPSplayer.lua slightly so that it will work with crouching. I thought I would post a link to it here since a lot of people have trouble figuring this out. https://www.dropbox.com/s/rbh1iof5qubss78/Edited%20FPSplayer.lua?dl=0
  9. Try changing - self.context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) in your App.lua to - self.context:DrawText("FPS: "..Time:UPS(),2,2)
  10. Nice job, those are some good looking models. Also the funny model made me laugh.
  11. I keep getting this error - Writing screenshot "C:\Users\Hayden\AppData\Local/HalloweenProject/Screenshots/screenshot1.tga"... Failed to write screenshot "C:\Users\Hayden\AppData\Local/HalloweenProject/Screenshots/screenshot1.tga". am I doing something wrong? my code is just this - if self.window:KeyHit(Key.I) then self.context:Screenshot() end EDIT -- Talked to macklebee about the issue and it was just that my "Hayden" folder was locked. So I changed the path like so - self.context:Screenshot("c:screenshot.tga") and everything works.
  12. Ah, that makes sense. Is there anyways to enable screenshots in workshop games? I think context:Screenshot() only works with lua sandbox disabled so that won't do.
  13. Does Lua Sandboxing disable Steamworks? It seems like it does and that is unfortunate because there is no way for people to take screenshots in Workshop Games unless they use some other software.
  14. I published my halloween game to the workshop for testing and all of the items I got from the workshop failed to load. This is what the log says to every workshop item- Loading model "C:/Program Files (x86)/Steam/steamapps/common/Leadwerks Indie Edition/Templates/Common/AddOns/Halloween Model Pack/pumpkin_carved.mdl" Failed to read file C:/Program Files (x86)/Steam/steamapps/common/Leadwerks Indie Edition/Templates/Common/AddOns/Halloween Model Pack/pumpkin_carved.mdl Deleting model "C:/Program Files (x86)/Steam/steamapps/common/Leadwerks Indie Edition/Templates/Common/AddOns/Halloween Model Pack/pumpkin_carved.mdl" I am using Leadwerks Indie Edition and am in the beta.
  15. Good stuff Rick! I really like how you are setting up the sequences and I love that overhead play-style.
  16. That sounds like a solid design. I would go with making a new level when you switch to the industrial area just so you can make the most out of each separate area without running into performance issues. Using a lift for the map change is a great idea. Keep up the good work, I am looking forward to seeing more!
  17. Wow! I really like the sewers layout, great job.
  18. Everytime I try to add a shader to a material it doesn't work. I am using Leadwerks Indie edition and am in the beta. More info in this video - https://www.youtube.com/watch?v=B0YhnuMfI1A
  19. I just found this game changing tutorial for how to make trees without hours of tedious modeling. Check it out! --
  20. I have been getting the same problem ever since the last update. I didn't know it could be fixed by choosing angular threshold though, thanks for that.
  21. Very nice job! I am enjoying this update a lot. The new workshop changes make the workshop way more useful and user friendly. Having vehicles supported but not documented is like knowing what your christmas present is but you can't open it. I hope to see some documentation soon!
  22. You were correct, I placed collectgarbage() in my App Loop and everything cleans up. Testing memory usage is tricky with Lua.
  23. I see, that is a bummer because these shaders are to complicated for me to figure out what could be wrong. Guess I will have to disable them for now.
  24. I found this bug by checking my log file after play testing Hunt For Food. The fog shader is loaded when it rains and it should delete when it stops raining but after I checked my log I noticed that it wasn't being deleted and I just had a bunch of fog shaders being loaded everytime it started raining. I checked over the shaders and the fog shader is loaded through a script but the fxaa and contrast shaders are not. Which means that this happens regardless of the shader being loaded through a script.
×
×
  • Create New...