Jump to content

Imchasinyou

Members
  • Posts

    240
  • Joined

  • Last visited

Everything posted by Imchasinyou

  1. If you attach the flicker script and play with that a bit, it will give the torch a more realistic feel as the light then kind of flickers a bit with the fire.
  2. Yep, sure did. . . . I even removed it and replaced it. Sent you a PM and a steam invite
  3. back to the error on attempt to index field 'camera' (a nil value) Attached the edited file. for me, the line in question is 154 self.camera:SetFOV(70) FPSPlayer.lua
  4. I think its the changes from the weapon pick up script since I added a line that stops the creation of the camera since I set one in the scene.
  5. OK, I forgot to add in the top section addition of the file. NOW, it throws an error about: fpsplayer.lua" : 153 : attempt to index field 'camera' (a nil value) Shouldnt have anythign to do with this right?
  6. Got myself an error. Nothing new for me but I got attempt to perform arithemetic on field "crouchedheight" (a nil value) line 646 if it needs to be broken, let me play with it. I copied and pasted the new section into my FPSPlayer.lua file as there are changes made to mine already. Here is the new part pasted. -- Check for crouching if window:KeyHit(Key.C) then self.crouched = not self.crouched end --With smoothing --Position camera at correct height and playerPosition self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , self.crouched, 1.0, 0.5, true) local playerPos = self.entity:GetPosition() local newCameraPos = self.camera:GetPosition() --local playerTempHeight = ((self:IsCrouched() == 1) and crouchHeight or playerHeight) newCameraPos = Vec3(playerPos.x, newCameraPos.y ,playerPos.z) if self.crouched==true then if newCameraPos.y<playerPos.y + self.crouchedheight then newCameraPos.y = Math:Curve(playerPos.y + self.crouchedheight, newCameraPos.y, self.camSmoothing) else newCameraPos.y = playerPos.y + self.crouchedheight end elseif newCameraPos.y<playerPos.y + self.eyeheight then newCameraPos.y = Math:Curve(playerPos.y + self.eyeheight, newCameraPos.y, self.camSmoothing) else newCameraPos.y = playerPos.y + self.eyeheight end self.camera:SetPosition(newCameraPos) end Here is my entire file if interested in looking at it.FPSPlayer.lua
  7. Come on! Stop teasing me and just give it up already.
  8. This works perfectly. Now can the player carry 2 weapons and choose between them or is that a seperate function? man I need a dedicated scripter to help me :/. . . .
  9. If it were me, and Im no expert by any means, Id probably use a grey steel for the torch. Experiment some with different textures. I actually buy a lot of assets so I have several some where in my library. In the material editor, you can adjust the shine with the color selectors for the diffuse and specular?. again, experiment with this. Its a real time adjustment so you can see it as you do it. Search on Google or other browser for "steel texture" save one to your desktop and then import it to the project files. Right clicking the texture will allow you to generate a "normal map" which you can adjust for its depth which will create the actual bumpiness of the texture. Ill be happy to make a short video if you think it will help some. . . .
  10. Thats great Hayden. Something i just figured wasnt quite ready even if its just moving the camera down to a lower level. How might we assign a specific key for this? I think its control in the script when i was looking at it. Id rather it be "C". Ill try to figure that out on my own unless you pass along a secret to us all. BTW, GREAT contributions like this will make the community stronger! lines 592-595 appears to be for setting the crouch button so- -- Check for crouching if window:KeyHit(Key.ControlKey) then self.crouched = not self.crouched end could be made into -- Check for crouching if window:KeyHit(Key.C) then self.crouched = not self.crouched end Then it appears as if lines 597 - 618 are the crouch function.?
  11. https://www.dropbox.com/sh/0dvu1s6yuwhbnnl/AAC5HHuFpB7s58oXq-Tycjgda?dl=0 This contains my empty map with the weapon pick up script if any one is so inclined to have a peek to see why it wont work.
  12. Im going to export this map and post it to my drop box. If you dot mind, take a look at it and see if everything is there.
  13. Tried that, if this is what you meant. function Script:LoadWeapon() --Load the default weapon, if one is set if self.weaponfile~="" then local entity = Prefab:Load(self.weaponfile) if entity~=nil then System:Print("weapon file loaded") if entity.script~=nil then entity.script:Start() entity.script.player = self self.weapon = entity.script self.weapon.entity:SetParent(self.camera) self.weapon.entity:SetRotation(0,0,0) self.weapon.entity:SetPosition(0,0,100) end end end end That didnt work. Its just not loading that prefab weapon. Its like it knows it needs to but cant find it or something.
  14. Same results here too. Here is the consoles log. Executing "C:\Users\Andrew\Documents\Leadwerks\Projects\GunTutorial\GunTutorial.exe"... Initializing Lua... Lua sandboxing enabled. Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Scripts/Error.lua" Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Scripts/App.lua" Initializing OpenGL4 graphics driver... OpenGL version 431 GLSL version 430 Device: ASUS R9 270X Series Loading map "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Maps/start.map"... Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/materials/developer/bluegrid.mat"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/materials/developer/BlueGrid.tex"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Model/diffuse.shader"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Common/bfn.tex"... Loading component "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/scripts/objects/player/fpsplayer.lua..." Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/scripts/objects/player/fpsplayer.lua" Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Scripts/Functions/ReleaseTableObjects.lua" Loading component "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/scripts/objects/triggers/weaponpickup.lua..." Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/scripts/objects/triggers/weaponpickup.lua" Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Terrain/stamp.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Terrain/updatenormals.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Terrain/clear.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Terrain/clipmap.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Terrain/terrain.shader"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/materials/nature/terrain_savannah_dirt.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/HUD/crosshair.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/HUD/use.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/HUD/blood1.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/HUD/blood2.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/HUD/blood3.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/HUD/blood4.tex"... Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Player/flashlight_02_on.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Impact/body_punch_03.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Impact/body_punch_04.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Player/pickupammo.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Footsteps/Concrete/step1.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Footsteps/Concrete/step2.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Footsteps/Concrete/step3.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Footsteps/Concrete/step4.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Footsteps/Concrete/jump.wav..." weapon file = Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Model/default.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Misc/occlusionquery.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Lighting/ambientlight.shader"... Loading prefab "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Prefabs/Weapons/PPSH.pfb"... Loading model "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/models/weapons/ppsh/ppsh.mdl" Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/models/weapons/ppsh/ppsh.mat"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Model/Animated/diffuse+normal.shader"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Shaders/Model/Shadow/shadow+animation.shader"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/models/weapons/ppsh/ppsh.tex"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/models/weapons/ppsh/ppsh_dot3.tex"... Loading component "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/scripts/objects/weapons/ppsh.lua..." Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/scripts/objects/weapons/ppsh.lua" Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Scripts/AnimationManager.lua" Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Ricochet/bullet_impact_dirt_01.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Ricochet/bullet_impact_dirt_02.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Ricochet/bullet_impact_dirt_03.wav..." Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/tracer.mat"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/tracer.tex"... Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Weapons/Autopistol/revolver_dry_fire_01.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Weapons/Autopistol/gun_357mag_01.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Weapons/Autopistol/gun_357mag_02.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Weapons/Autopistol/gun_357mag_05.wav..." Loading sound "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Sound/Weapons/Autopistol/bullet_load_into_chamber_02.wav..." Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/muzzleflash.mat"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/shaders/model/flat/diffuse.shader"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/muzzleflash.tex"... Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/default.mat"... Loading shader "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/shaders/particles/default.shader"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/default.tex"... Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/smoke.mat"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/smoke_particle.tex"... Loading material "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/bloodspatter.mat"... Loading texture "C:/Users/Andrew/Documents/Leadwerks/Projects/GunTutorial/Materials/Effects/bloodspatter.tex"... weapon file loaded Setting breakpad minidump AppID = 251810 Steam_SetMinidumpSteamID: Caching Steam ID: 76561198039260066 [API loaded no] Process Complete.
  15. Loading component "C:/Users/Andrew/Documents/Leadwerks/Projects/Zombies/scripts/objects/triggers/weaponpickup.lua..." Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/Zombies/scripts/objects/triggers/weaponpickup.lua" Loading component "C:/Users/Andrew/Documents/Leadwerks/Projects/Zombies/scripts/objects/player/fpsplayer.lua..." Executing file "C:/Users/Andrew/Documents/Leadwerks/Projects/Zombies/scripts/objects/player/fpsplayer.lua" Something like that? Im going to make a quick map, import the scripts over and see if anything changes from this level to a fresh level
  16. Once upon a time, I had that very same window. I havnt seen it in some time. Ill see if its something I can find/fix Managed to get that back. . . . . Lemme see if I can find what you mentioned above
  17. something has occurred to me. I have seperate weapon scripts for each of my weapons. So, Im wondering if that has anythignt odo with my issues and if it does, Ill feel totally retarded!
  18. Im still not seeing anything along the line of a message
  19. getting better, i atleast have a small bit of lag as if its trying to load something with that change
  20. My output screen is all greyed out. If you are referring to the window that opens when you run the game with the actual window created by the game Id be happy to teamview this to find the error if your interested. You can add me on steam by searchign Gen - Imchasinyou
  21. I did find tyhat but didnt make any differance. Would it matter that i do not actually use a camera, I use the prefab player.
  22. Ill have to look at the tutorial again to see if that is what was used. Maybe I didnt see it.
  23. Rick, ive tried this over and over. Im not seeing my error. Ive followed you line by line. The box disappears but im not getting the weapon prefab set in the vmodel. If you have a minute to look over the scripts and see if you see my issue, Id appreciate it greatly. The tutorials are great for us noob non coders. I have included the FPSPlayer, FPSWeapon, FPSGun and the Pick up script in my drop box to reduce the clutter here in the forums. https://www.dropbox.com/sh/6woj1ju95d95gxl/AACXJ2Kdfbw2B_WOnx_Z433oa?dl=0
  24. My Rum soaked tutorial. Take it for what it is. If it helps you great, if not. . . . . well. . . .
  25. Im still tinkering with my silly Zombie game. Totally stoked I figured out how to add new weapons and make them work! BTW, I made a tutorial after having a few drinks so if you need to import new weapons, watch it. Here is my channel https://www.youtube.com/channel/UC-zfMu2hnZ4BlzBR-CfQbUA http://youtu.be/dnhYxEEkxTI
×
×
  • Create New...