Jump to content

Imchasinyou

Members
  • Posts

    240
  • Joined

  • Last visited

Everything posted by Imchasinyou

  1. what do you mean a tool to put levels together? There is already a level change script that can be applied to anythign that you want the player to collide with. On collision, you can load the player into a different level. Place a CSG box in your scene, set its physics type to trigger and apply the level change script in the script tab once you apply the script, there is a field to set the next maps name. Place the next levels name in that field. On collision with the player, you will change levels. You must have a second level started with the player in it for this to work. I would agree on the hands. I dont much care for the no hands when your walking until you have a weapon. The pick up script submitted by Hayden is a very simple solution and can be applied to anything and allows for setting how many rounds are picked up I think. There is also a med pack script that allows for setting how much health is given by each one. It disappears after being picked up. There are some med pack props in the workshop that work flawlessly with that script. Lastly, here is a simple tutorial on switching levels. Use full screen and HD. I hope this is what you wanted. Im far from an expert with leadwerks and cant script anything to save my life but even I am able to get something fairly decent. http://youtu.be/R1xm2ZejlxE
  2. One solution to the border issue you have is to create a csg box (wall) around your area and then apply the invisable.mat to it. Then its there, has a collision but yet cant be seen.
  3. Just passing along the little i know. Glad to help out in any way.
  4. So, scripts can now be uploaded to the workshop? Is it then possible to add in a text file for instructions? That's where I thought the forums would be handy.
  5. Thanks for the mention Hayden. Hey Josh, would it hurt to ask for a scripts forums as a child of the programming forums. Id hate to see scripts like these get lost in the conversations when they could easily help out those that need it. . . . . . im one of those ppl BTW.
  6. Ive made a tutorial on importing weapons if you have not yet gotten it to work. Here is my channel, https://www.youtube.com/channel/UC-zfMu2hnZ4BlzBR-CfQbUA
  7. 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.
  8. Yep, sure did. . . . I even removed it and replaced it. Sent you a PM and a steam invite
  9. 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
  10. 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.
  11. 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?
  12. 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
  13. Come on! Stop teasing me and just give it up already.
  14. 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 :/. . . .
  15. 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. . . .
  16. 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.?
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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
  22. 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
  23. 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!
  24. Im still not seeing anything along the line of a message
  25. getting better, i atleast have a small bit of lag as if its trying to load something with that change
×
×
  • Create New...