Jump to content

Einlander

Members
  • Posts

    778
  • Joined

  • Last visited

Posts posted by Einlander

  1. This bug my have been fixed on linux, but it it now introduced into windows.

    http://www.leadwerks.com/werkspace/topic/12816-linux-al-device-is-not-closed-by-c/

     

    I have gotten it to crash while loaded in Visual Studio but i'm not proficient enough in c++ to diagnose the problem.

     

    A map to replicate the bug

     

    https://www.dropbox.com/s/psw5g2ur77agre6/audiobug.map?dl=0

     

    1. Start a new project with the Advanced First Person Shooter template

    2. Load map

     

    Run map, DO NOT PRESS ANY WASD Key. A sound will play. Press esc. It should crash.

     

    Run map again. DO NOT MOVE AGAIN. A sound will play. Move the player until you hear 1 footstep. Press escape. No crash.

  2. Here we go:

     

    tzgw8qM.png

     

    
    

    Script.enabled = true --bool "Enabled"

    Script.on = true --bool "Start on"

    Script.coloron = Vec3(255,255,255) --color "Color On"

    Script.coloroff = Vec3(0,0,0) --color "Color Off"

     

     

    function Script:Start()

    if self.on == true then

    self:On()

    else

    self:Off()

    end

    end

     

     

    function Script:On() -- in

    self.entity:SetColor(self.coloron.x,self.coloron.y,self.coloron.z,255)

    self.component:CallOutputs("On")

    end

     

    function Script:Off() --in

    self.entity:SetColor(self.coloroff.x,self.coloroff.y,self.coloroff.z,255)

    self.component:CallOutputs("Off")

    end

     

     

    function Script:Enable()--in

    if self.enabled==false then

    self.enabled=true

    self.component:CallOutputs("Enable")

    self.entity:Show()

    end

    end

     

    function Script:Disable()--in

    if self.enabled then

    self.enabled=false

    self.component:CallOutputs("Disable")

    self.entity:Hide()

    end

    end

  3. I was updating a pain trigger and noticed that in the fpsplayer.lua file that the functions:

    Script:Hurt(damage,distributorOfPain)
    and
    Script:TakeDamage(damage)
    
     

     

    Script:Hurt will lower your health and when dead initiate the death sequence by calling Script:Kill(), BUT it will NOT set the players self.alive to false, call Script:OnHit() or Script:OnDead()

     

    Script:TakeDamage will lower your health, set your self.alive to false, call the self:OnHit() and self:OnDead() outputs but will not start the death sequence by calling Script:Kill()

     

    Fixed functions:

     

    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
    		self:OnHit()
    		if self.health<=0 then
    			self.alive = false
    			self:Kill()
    			self:OnDead()
    		end
    	end
    end
    
    
    
    function Script:TakeDamage(damage)
    	-- Decrease health
    	self.health = self.health - damage;
    	-- Call OnHit output
    	self:OnHit()
    	-- If health lower or equal to zero, the player is dead
    	if self.health <= 0 then
    		self.alive = false
    		-- Call the OnDead output
    		self:OnDead()
    		self:Kill()
    	end
    end

     

     

    • Upvote 1
  4. After some leaps of faith I have come up with a fascinating solution. I used the GetEntityNeighbors.lua file found in the functions folder. I set the entity as itself (i'm using a pivot), with a radius of 0 and false for the scripts parameter. Sadly this will only tell you the outermost object of what you are in. So if you walk in a building in your game, it will return the building entity.

     

    Is there a way to return the innermost entity you are in, if you are in one? For you place an entity inside a box, that's inside a safe?

  5. In my game I would like to have flat land with some lakes and pools here and there, but with the current terrain tools its not directly possible. I would need to paint the entire terrain to that height and then make the lakes. I can't zoom out and paint because .1 it gets less accurate and 2. the poly count and culling of the engine.

     

    My solution to this would be to either have a set terrain height slider/number box.

  6. The ability to take a entity created by csg and convert it to a mdl file WITH all the surfaces preserved would help accelerate my work in Leadwerks. The obj export collapses all the meshes to 1 object, and the vtf and obj exports do not preserve the textures. With the prefab it is prone to texture shifting and when rotated, depending on the rotate tool used, objects rotate incorrectly. With an mdl export it would be another model entity that I can share with few complications.

     

    If implemented, the mdl should not be collapsed. it should preserve the hierarchy and surfaces. Then the user can collapse them later.

    • Upvote 2
  7. What happens is if windows detects a failure in the graphics card driver (program doing odd things with graphic contexts, application holding on too long to a context and not responding, and millions of other reasons), windows will simply reset the driver itself. Your screens will go dark, your monitors might say they are disconnected and then they will come back. You will get a system notification that looks something like this https://tinkertry.com/display-driver-nvlddmkm-stopped-responding. The amd ones look exactly the same, but it says AMD. Today I haven't had any problems with Leadwerks. That and its a lot cooler today. So I'll be checking the ventilation and the fans on the cards (I don't run with the case one anyway)

  8. With today's beta update i get constant driver resets with my amd gfx card. I can't give much info on whats causing it to crash nor can I record it since it crashes the video recording software too.

    The fastest way i know to make it crash is to fly around the level in the perspective view. I can get ti to crash withn 5 seconds.

     

    Specs:

    Card: dual R9 270x 3GB

    CPU : AMD FX- 8350 4.00GHZ

    Ram: 12GB

    OS: Windows 7 Pro 64

    Driver Version: 15.6 (I had 15.4 where it crashed, 15.6 crashes also)

     

    Map that causes the crash.

×
×
  • Create New...