Jump to content

lxFirebal69xl

Members
  • Posts

    333
  • Joined

  • Last visited

Everything posted by lxFirebal69xl

  1. Thanks for that find! I just told the people with problems to disable DSR, see if that fixes it for them, will update in a bit. I should really drop LEX1 altogether but I was waiting until the GUI update to do that.
  2. The issue fixed was this "In windowed mode the game crashes for me after the prologue with Lucy is done. I tried verifying game files and reinstalling." Not this "I can only run this in windowed mode, fullscreen messes with the screen resolution or something and I can't point-click and select options or new game." Also this guy has the same problem: (added to original post) http://steamcommunity.com/app/569430/discussions/1/154644045358568399/
  3. I will be writing blogs on doing things outside of leadwerks, promoting, exposure, data analysis, things like that. I wouldn't mind showing how I've been polishing my game, and other things, since I got a really big project, I found ways and did things that most users never even thought of doing
  4. Last time I tried, it was only a 1-2 second difference and made the loading screens black. So dunno if I want to go that route.
  5. Due to the game being released on steam, I was able to find a few issues with the game/leadwerks that weren't apparent before. I'll be updating the thread as time goes on for everyone's ease of use, especially Josh. 1 Loading times are long, even using the new --Pause garbage collection System:GCSuspend() --Resume garbage collection System:GCResume() NOT FIXED YET. 2 Switching from windowed to fullscreen is causing the game to stretch more than it should for a user. http://www.leadwerks.com/werkspace/topic/15419-switching-from-windowed-to-fullscreen-screws-up-resolution/ http://steamcommunity.com/app/569430/discussions/1/154644045364507570/ http://steamcommunity.com/app/569430/discussions/1/154644045358568399/ NOT FIXED YET. 3 Keypad script making some users crash! http://www.leadwerks.com/werkspace/topic/15409-keypad-script-makes-some-user-crash/ Made changes to the code ( Thanks SRB ) waiting on player's feedback! 4 ClearPostEffects() bleeds out graphics. http://www.leadwerks.com/werkspace/topic/15421-clearposteffects-making-graphics-go-crazy/#entry103400 FIXED. I'll be updating this post as time goes on.
  6. Yeah, agree, this is the only shader I'm thinking of using for the game that's dynamic. So I guess I can do it this way without problems.
  7. I was able to fix this by using: self.camera:RemovePostEffect(4) It was counting the root shaders.
  8. Medkit script: Script.health = 50.0 --float "Health" Script.useOnce = true --bool "Use once" Script.ObjectDescription = "I'm not hurt." --string "Object Description" Script.enabled = true --bool "Enabled" Script.soundfile=""--path "Sound" "Wav Files (*.wav):wav" local font1 = Font:Load("Fonts/MODERN SERIF ERODED.ttf", 20) function Script:Start() if self.soundfile then self.sound = Sound:Load(self.soundfile) end if self.health < 0 then error ("Health can't be a negative value.") end end function Script:Use(player) if player.health < player.maxHealth then self.enabled = false if self.sound then self.sound:Play() end player.health = self.health + player.health player:CameraFix() if self.useOnce then self.entity:Release() end elseif self.enabled == true then self.component:CallOutputs("Use") self.ObjectDescription = "Much better now." self:GetText() end end function Script:GetText() if self.enabled == true then return self.ObjectDescription end end function Script:Enable()--in self.DisplayEnabled=true end function Script:Disable()--in self.DisplayEnabled=false end Hurt script: function Script:Hurt(damage,distributorOfPain) if self.health>0 then self.sound.damage[math.random(#self.sound.damage)]:Play() self.health = self.health - damage self.hurtoffset = Vec3(math.random(-1,1),math.random(-1,1),0):Normalize()*30 local blood = {} local n=1 blood.texture=self.image.blood[math.random(1,4)] blood.intensity=1 table.insert(self.bloodoverlay,blood) if self.bloodindex>4 then self.bloodindex=1 end if self.health<=0 then self:Kill() end end if self.health < 50 then self.camera:AddPostEffect("Shaders/PostEffects/radiation.shader") end end Code that is called when medkit is used: function Script:CameraFix() if self.health > 50 then self.camera:RemovePostEffect(0) end end
  9. Using the self.camera:RemovePostEffect(0) Does indeed fix the issue, but doesn't remove the radiation post effect, so I guess I'm calling it multiple times, don't know how though since this if self.health < 50 then self.camera:AddPostEffect("Shaders/PostEffects/radiation.shader") end Only gets called when the player is hurt, aka in the Hurt() function.
  10. So, when the player gets below a certain amount of health this happens: if self.health < 50 then self.camera:AddPostEffect("Shaders/PostEffects/radiation.shader") end Calls a simple shader to the camera, and this works without issues. Now the thing is, I made this function. function Script:CameraFix() if self.health > 50 then self.camera:ClearPostEffects() end end Which gets called every time the player picks up a health item in the game. Here's a video demonstrating what happens when I grab a health item and the CameraFix() is called.
  11. Hey gents, Another day, another post about a problem. Switching from windowed to fullscreen is causing the game to stretch more than it should for a user, making it so he has to bring his mouse all the way to the bottom of the screen to click on the menu items that are in the middle of the screen, the thing is, his monitor is 1920x1080 and that's the default resolution the game launches in, but in windowed mode. This issue doesn't happen to me personally, and I have a monitor similar to the user's. Any clue what could be causing this?
  12. Update #1- Here are the specs of a user that used the keypad without problem: Rig Intel 5960X, 32 gig mem, Titan X (Maxwell), Windows 10. 1920x1080 And the specs of someone who can't use the keypad: AMD A6-3600 APU with Radeon™ HD Graphics, 8GB RAM, GeForce GTX 750 Ti, Windows 7. 1920x1080 My first instinct is to call it an AMD problem because we all know leadwerks has had plenty of those. But the problem is that it outright crashes the game when the user goes through this function: function Script:Cancel() --in self.CurrentCode = 0 self.CurrentDigit = 1 self.component:CallOutputs("Cancel") end
  13. Hey gents, here's a weird one. I have a keypad working in my game but some users experience crashes when they press the "Cancel" or the "Accept" button. I zipped up a quick map with how I have it set up. I ran the level I have in the game through VS and came up with an error that according to Josh has no relevance. I am using Genebris Damage Numbers to create the numbers of the keypad. http://steamcommunity.com/sharedfiles/filedetails/?id=404088984&searchtext=damage Here's the test map: https://drive.google.com/file/d/0B8hS3jGOv-XEYjBzN25MWnFaOWs/view?usp=sharing Keypad code: Script.player = nil Script.GotPlayer = false Script.CodeLen = 4 --int "Code Len" Script.Code = 1234 --int "Code 123" Script.CurrentCode = 0 Script.CurrentDigit = 1 Script.Camera = nil Script.CameraSmoothing = 10 Script.PosCameraSmoothing = 10 --int "Camera smoothing" Script.CameraTarget = nil Script.CameraStart = Vec3(0,0,0) Script.RotCameraTarget = Vec3(5,90,0) Script.RotCameraStart = Vec3(0,0,0) Script.Enabled = true --bool "Start enabled?" Script.Size = 0.1 function Script:Start() self.NumPrefabs = {} local mepos = Vec3(-1,0,0) --mepos = mepos + Vec3(0,0,0) local tarpos = Transform:Point(mepos, self.entity, nil) self.CameraTarget = tarpos --local box = Model:Box(0.25, 0.25, 0.25) -- box:SetPosition(tarpos, true) local merot = self.entity:GetRotation() + Vec3(0,90,0) local tarrot = Transform:Rotation(merot, self.entity, nil) -- tarrot = tarrot + Vec3(0,90,0) self.RotCameraTarget = merot end function Script:RemoveNums() for i = 1, #self.NumPrefabs do self.NumPrefabs[i]:Release() end end function Script:MakeNums(num) for i = 1, #self.NumPrefabs do self.NumPrefabs[i]:Release() end local Ccode = tostring(num) local amount = string.len(Ccode) for i=1, string.len(Ccode) do local entity = Prefab:Load("Damage numbers/prefabs/"..string.sub(Ccode,i,i)..".pfb") entity=tolua.cast(entity, "Sprite") entity:SetParent(self.entity) entity:SetSize(self.Size, self.Size) entity:SetPosition(0,0.5,self.Size*amount/2-self.Size/2-self.Size*(i-1)) entity:SetRotation(0,-90,0) --entity:SetColor(color) self.NumPrefabs[i] = entity end end function Script:Use(player) if self.Enabled == true then self.player = player.entity self.GotPlayer = true self.CameraStart = player.camera:GetPosition(true) self.player.script.Locked = true Window:GetCurrent():ShowMouse() Window:GetCurrent():SetMousePosition(0,0,0) self.RotCameraStart = player.camera:GetRotation(true) else --What happens if its not enabled and the player uses it? Type code here! end end function Script:UpdateWorld() if self.GotPlayer == true and self.player ~= nil then local window = Window:GetCurrent() if window:KeyHit(Key.E) or self.Enabled == false then self.GotPlayer = false self.player.script.Locked = false self.player= nil window:HideMouse() self:RemoveNums() return end local newpos = self.player.script.camera:GetPosition(true) newpos.x = Math:Curve(self.CameraTarget.x, newpos.x, self.PosCameraSmoothing) newpos.y = Math:Curve(self.CameraTarget.y, newpos.y, self.PosCameraSmoothing) newpos.z = Math:Curve(self.CameraTarget.z, newpos.z, self.PosCameraSmoothing) self.player.script.camera:SetPosition(newpos,true) local newrot = self.player.script.camera:GetRotation(true) --newrot = Transform:Rotation(newrot, self.player.camera, self.entity) newrot.x = Math:Curve(self.RotCameraTarget.x, newrot.x, self.CameraSmoothing) newrot.y = Math:Curve(self.RotCameraTarget.y, newrot.y, self.CameraSmoothing) newrot.z = Math:Curve(self.RotCameraTarget.z, newrot.z, self.CameraSmoothing) --newrot = Transform:Rotation(newrot, self.entity, nil) self.player.script.camera:SetRotation(newrot, true) if window:MouseHit(1) then local p = window:GetMousePosition() p.z = 1 --distance in front of the camera to project to p = self.player.script.camera:UnProject(p) local pickInfo = PickInfo() if self.entity.world:Pick(self.player.script.camera:GetPosition(true), p, pickInfo, 0, true, Collision.Prop) then --System:Print(1) if pickInfo.entity.script ~= nil then local m = pickInfo.entity.script.Key -- System:Print(m) --System:Print(1) if m == "0"or m == "1" or m == "2" or m == "3" or m == "4" or m == "5" or m=="6" or m=="7" or m=="8" or m=="9" then if self.CurrentDigit <= self.CodeLen then local l = tonumber(m) self.CurrentCode = self.CurrentCode + (l*(10^(self.CodeLen - self.CurrentDigit))) self.CurrentDigit = self.CurrentDigit + 1 System:Print(self.CurrentCode) self.component:CallOutputs("Button Push") end elseif m =="use" then if self.CurrentCode == self.Code then System:Print("correct") self.component:CallOutputs("Correct") self.player.script.Locked = false self.player = nil self.GotPlayer = false self:Cancel() else System:Print("incorrect") self.component:CallOutputs("Incorrect") self:Cancel() end elseif m == "cancel" then self:Cancel() end --[[if type(pickInfo.entity.script.Key) == "userdata" then System:Print("here") local m = pickInfo.entity.script.Key System:Print(m) --local par = pickInfo.entity:GetParent() --local d = par:GetKeyValue("name", "error") end--]] self:MakeNums(self.CurrentCode) end end end end end function Script:Cancel() --in self.CurrentCode = 0 self.CurrentDigit = 1 self.component:CallOutputs("Cancel") end function Script:UpdatePhysics() if self.GotPlayer == true then self.player:Stop() end end function Script:Enable() --in self.Enabled = true self.component:CallOutputs("Enable") end function Script:Disable() --in self.Enabled = false self.component:CallOutputs("Disable") end function Script:Toggle() --in self.Enabled = not self.Enabled self.component:CallOutputs("Toggle") end
  14. I'm having an issue with crouching in my game that doesn't allow the player to climb over certain objects. Example: The player can't walk over that if he's crouched, but can walk over it just fine while not crouched. The code as it is allows me to crouch under an obstacle, like vents for example, but I find it funny that I'm having the opposite issue. Here's my crouch script, or the parts that matter. Script.crouched = false Script.crouchheight = 1.2 -- 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 = 0 if (self:IsCrouched()) then playerTempHeight = self.crouchHeight + playerPos.y else playerTempHeight = self.playerHeight + playerPos.y end --playerTempHeight = ((self:IsCrouched() == true) and crouchHeight or playerHeight) newCameraPos = Vec3(playerPos.x, newCameraPos.y ,playerPos.z) --With smoothing --CROUCH BEGIN local target_height --determine the height of the camera if self.crouched then target_height = self.crouchheight else target_height = self.eyeheight end --With smoothing --calculate the new camera position if newCameraPos.y<playerPos.y + target_height then newCameraPos.y = Math:Curve(playerPos.y + target_height, newCameraPos.y, self.camSmoothing) else newCameraPos.y = playerPos.y + target_height end --CROUCH END Any clues as to how I could fix this issue?
  15. Just gave it a try and I see potential in your project. Here's an elaborate pro and con list of what I thought about this little demo Pros: -Felt very surreal, surreal horror is very rare and rarer in leadwerks, I think you should focus on this aspect of the game since you'll definitely stand out -Interesting premise, the story made me curious, I don't know what you have planned or though of, but I think you're heading in the right direction -Graphics look really solid -The soundtrack fit the overall ambiance of the game -Really cool environment Cons: -Even if it's just a little concept you have going on, you have to give players better objectives than "flip that" or "open this". Try and be a bit more creative, you can have the player find the switch instead of just flipping it, and that makes the player explore more of your cool environment. -Backtracking, you made the player go out into the ocean (which was good) then you made them come back to that little area you had (which is bad). Backtracking can work if the area is a bit bigger and you make other things happen when the player is heading back. Keep in mind that my little list is like I was reviewing an actual full on title, this is more meant to help you continue developing games than to unmotivate you, they're things I learned from more experienced people or by myself while making my project. Hope I helped in some ways!
  16. Time to work on something else for once, I want that poster
  17. Alright so after a few test runs, I found the issue. In the console it says this: I then researched a bit and found this on the forums: http://www.leadwerks.com/werkspace/topic/13333-possible-reference-count-error/#entry93903 Looks like the same issue I'm having, but again, this is the only map where this doesn't work so it's a really weird error.
  18. i haven't updated anything still last version of 4.1 so I don't know.
  19. Whenever I try to play this specific map the game always stops responding right after it's done loading, I can hear the background noise for a second then boom. This: This is the only map that has this issue, I can load and play all the others just fine. Things I've tried to no avail: -Made new project tried the map there. -Built game, crashes when the level is done loading. -Removed various things, like props, physics, shaders, same issue. -Removed AI. I've uploaded the map if case you care to take a look, I'm really lost on this one. 04_Sewers_2_1.rar
  20. I've been looking into making specific objects highlight when the player gets close to them. So far the closest thing I found is an old shader called edgeglow, but I have no clue how I would apply that to a model. This picture is kind of what I'm going for, but not as intensive, more just the actual outline of the entities.
  21. lxFirebal69xl

    Analytics

    This would make it a lot simpler to see what players do when they play our games. Yes from me!
  22. I've been working on a script that's based on an old reepblue script he included in his old lex template. I want it to damage the player as long as he's inside the trigger box, but right now, it just kills him outright, can't get the timer to work I think, what am I doing wrong? Script.enabled=true --bool "Start Enabled" Script.entered = false Script.exited = false Script.hadCollision = false Script.RefireTime = 1.0 -- float "Refire Time" Script.Timer = 0 Script.Tipped=false Script.damage=10--int "Damage" function Script:Start() self.enabled=true end function Script:UpdatePhysics() if self.enabled then if self.entered then if self.hadCollision == false then if self.exited == false then self.component:CallOutputs("onendTouchAll") --System:Print("onendTouchAll") self.Timer = 0 self.Tipped=false self.entered = false end end end self.hadCollision = false end end function Script:Collision(entity, position, normal, speed) if self.enabled then if entity:GetKeyValue("name") == "FPSPlayer" then self.hadCollision = true entity:AddForce(0,0,0) if self.entered == false then self.component:CallOutputs("onstartTouch") --System:Print("onstartTouch") self.entered = true self.exited = false end if not self.Tipped then self:Trigger(entity) end end end end function Script:UpdateWorld() if self.enabled and self.entered then -- A negitive value will disable this. if self.Tipped and self.RefireTime >= 0 then self.Timer = self.Timer + (Time:GetSpeed()/100) if self.Timer > self.RefireTime then self.Timer = 0 end end end end function Script:Trigger(entity) self.component:CallOutputs("OnTriggerTick") --System:Print("OnTriggerTick") -- Hurt the activator! if entity.script then if self.Timer == 0 then if type(entity.script.Hurt)=="function" then entity.script:Hurt(self.damage) end end end end function Script:Enable()--in if self.enabled==false then self.enabled=true end end function Script:Disable()--in if self.enabled then self.enabled=false end end
  23. This is exactly what I've been looking for!
×
×
  • Create New...