Jump to content

Jazz

Members
  • Posts

    265
  • Joined

  • Last visited

Everything posted by Jazz

  1. Works fine on the release version so I don't know.
  2. Just tried Little Dagon in the beta Launcher. The forward/back and left/right keys are reversed.
  3. I did this pretty fast so I'm sure others will have a better way to do it, maybe using tables or something. I didn't want to have to rename sounds or material files, just drop the material on and it detects what the sound is automatically. Gravel, snow, dirt, and wood added as well. Using FPSPlayer.lua, in UpDateFootSteps() it calls function GetMaterialSound() which returns the randomized footstep sound for that material to play. Hacked up sounds are from www.freesfx.co.uk and www.freesound.org. Extra textures are from my public domain archives. Original images are not included, only the .tex files. Create a FPS project and extract the archive in the project's main directory. File is 20MB Now if we could just get the material of the terrain... https://www.dropbox.com/s/2bco2wr1dlou4gr/footsteps.zip?dl=0
  4. Nice shader macklebee. Just made a (really) simple compass in PS for anyone to use/play with. I wrote the instructions out so new people can follow it. Extract the zip file into the Materials directory. This goes at the top of FPSPlayer.lua: Script.imageshader = Shader:Load("Shaders/drawimage_enhanced.shader") Script.Tx = Texture:Load("Materials/compass.tex") Script.Tx2 = Texture:Load("Materials/compasspointer.tex") This goes in FPSPlayer.lua's PostRender function after context:SetBlendMode(Blend.Alpha) context:DrawImage(self.Tx,100,100,200,200) local oldShader = context:GetShader() context:SetShader(self.imageshader) local angle = self.entity:GetRotation(true) self.imageshader:SetVec2("pivotposition", Vec2(100.0,100.0)) self.imageshader:SetFloat("angle", angle.y) context:DrawImage(self.Tx2,100,100,200,200) context:SetShader(oldShader) If you're using the release version (4.2) where the SetInput bug exists change the following line or player rotation won't be updated when standing still: 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 + 0.0000001, playerMovement.x, jump , false, 1.0, 0.5, true) compass.zip
  5. Playing with car tail lights.
  6. Crashes trying to release self.chassis. I put in self.chassis:Hide() as a test and it appeared to function okay.
  7. Please expose these commands to LUA. Ragdolls still need them. NEWTON_API dFloat NewtonJointGetStiffness (const NewtonJoint* const joint); NEWTON_API void NewtonJointSetStiffness (const NewtonJoint* const joint, dFloat state);
  8. Turn off sandbox mode.
  9. Now place the cylinder above the trigger and let it drop. Then hide the trigger and do it again.
  10. I already do that but the mouse still jumps off screen and back.
  11. I need the mouse to stay on the game screen.
  12. I'm using LUA. I should have stated that. Maybe something like this could be added to the engine. Curious how many LW users have a multi-monitor setup.
  13. Is there a command to lock the cursor to the monitor the game is on? When you accidentally click on another screen it minimizes the game.
  14. Jazz

    Rick Powers

    Latest updates: Update: 12 Jan Added: Title Screen and music Added: Menu -resolution -music volume -restart level -exit to title screen Added: Level loading screen Fixed: Ball doesn't wobble after you throw it Changed: Increased blast force Changed: Levels and textures Update: 10 Jan Added: Sticky Bomb Added: Destructible blocks Fixed: Ball collision sound crash bug Fixed: Some sounds not stopping after level load Update: 8 Jan Fixed: timing and mouse issues with vsync off Added: music to level1 http://www.leadwerks.com/werkspace/page/viewitem?fileid=833784148
  15. Jazz

    Beta update available

    I spent hours trying to find a bug which crashed my game after it was done loading a level. Turns out it was this last beta update. On the bright side I did find a couple of bugs.
  16. I never got it to work decently without modifying button.lua. Haven't used it for a long time but here's an old modified button.lua script. Script.pushed=false Script.hovered=false function Script:Draw(x,y,width,height) --System:Print("Paint Button") local gui = self.widget:GetGUI() local pos = self.widget:GetPosition(true) local sz = self.widget:GetSize(true) local scale = gui:GetScale() gui:SetColor(1,1,1,1) if self.pushed then gui:SetColor(0.2,0.2,0.2) else if self.hovered then gui:SetColor(0.3,0.3,0.3) else gui:SetColor(0.25,0.25,0.25) gui:SetColor(0.15,0.15,0.15,1.0,1) end end -- gui:SetGradientMode(true) -- gui:DrawRect(pos.x,pos.y,sz.width,sz.height,0,scale*3) gui:DrawRect(pos.x,pos.y,sz.width,sz.height,0,0) -- gui:SetGradientMode(false) if self.pushed then gui:SetColor(0.0,0.0,0.0) else gui:SetColor(0.75,0.75,0.75) end --gui:DrawLine(pos.x,pos.y,pos.x+sz.width,pos.y) --gui:DrawLine(pos.x,pos.y,pos.x,pos.y+sz.height) if self.pushed then gui:SetColor(0.75,0.75,0.75) else gui:SetColor(0.0,0.0,0.0) end --gui:DrawLine(pos.x+1,pos.y+sz.height-1,pos.x+sz.width-1,pos.y+sz.height-1) --gui:DrawLine(pos.x+sz.width-1,pos.y+1,pos.x+sz.width-1,pos.y+sz.height) if self.hovered then gui:SetColor(51/255/4,151/255/4,1/4) else gui:SetColor(0,0,0) end -- gui:DrawRect(pos.x,pos.y,sz.width,sz.height,1,scale*3) gui:DrawRect(pos.x,pos.y,sz.width,sz.height,1,0) local text = self.widget:GetText() if text~="" then gui:SetColor(0.0,0.0,0.0) if self.pushed then --gui:DrawText(text,pos.x+scale+scale,pos.y+scale+scale,sz.width,sz.height,Text.Center+Text.VCenter) else gui:DrawText(text,pos.x+scale,pos.y+scale,sz.width,sz.height,Text.Center+Text.VCenter) end gui:SetColor(0.75,0.75,0.75) if self.pushed then gui:DrawText(text,pos.x+scale,pos.y+scale,sz.width,sz.height,Text.Center+Text.VCenter) else gui:DrawText(text,pos.x,pos.y,sz.width,sz.height,Text.Center+Text.VCenter) end end end function Script:MouseEnter(x,y) self.hovered = true self.widget:Redraw() end function Script:MouseLeave(x,y) self.hovered = false self.widget:Redraw() end function Script:MouseMove(x,y) --System:Print("MouseMove") end function Script:MouseDown(button,x,y) --System:Print("MouseDown") self.pushed=true self.widget:Redraw() end function Script:MouseUp(button,x,y) --System:Print("MouseUp") local gui = self.widget:GetGUI() self.pushed=false if self.hovered then EventQueue:Emit(Event.WidgetAction,self.widget) end self.widget:Redraw() end function Script:KeyDown(button,x,y) --System:Print("KeyDown") end function Script:KeyUp(button,x,y) --System:Print("KeyUp") end
  17. Objects with swept collision enabled collide with every collision type. I need to get my ball through hidden models. I'm using the beta version.
  18. Runs fine in the editor but running the standalone gives me "Error: Bankstream overrun error" trying load any ogg. Game runs in the launcher but ogg doesn't play.
  19. Loads fast now. Good job! 4,401,121 byte 0.974 seconds When will the launcher be updated for ogg?
  20. I'll PM the ogg file link.
  21. At first I thought my game froze. Start ogg load: 3,737,638 bytes Loading sound "C:/Users../Music/journey forward_looped.ogg..." End ogg load : 29.416 seconds Start ogg load: 7,048,740 bytes Loading sound "C:/Users...Music/Glowsphere.ogg..." End ogg load : 87.434 seconds
  22. It may be stuck in attack mode calling the animation constantly. One-shot animations should only be called once. Adding System:Print("end animation") in your EndAttack function will show in the output window if it's getting called. You can try this script on the crawler prefab and see if it helps in any way. Script.mode = "idle" function Script:UpdateWorld() if window:MouseHit(2) then --play crawler attack animation self.mode = "attack" end if self.mode == "attack" then self.mode = "Waiting for animation to stop" self.entity:StopAnimation() self.entity:PlayAnimation("Attack2",0.009,10,1,"EndHit") elseif self.mode == "idle" then self.entity:PlayAnimation("Idle",0.02) end end function Script:EndHit() self.mode = "idle" end function Script:PostRender() context:SetBlendMode(Blend.Alpha) context:SetColor(1,1,1,1) context:DrawText("Mode: "..self.mode, 400, 200) context:SetBlendMode(Blend.Solid) end
×
×
  • Create New...