Jump to content

fhl42

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by fhl42

  1. when i import a new weapon and add a diffuse.shader and textures in the material editor and save this all the animations stop playing of the weapon or they play stupid in the model editor and ingame

    when i remove the material in model editor of my weapon and add a fake empty material the animation are playing again in the model editor and ingame

    and when i change rotation to of the weapon 90 degrees is ok but when i use -9.0 on the y axis the weapon  disappeare but when its -8.0 first the weapon is not there ingame but when i use left mouse to fire, the weapon appeare on screen ingame, this is both on steam leadwerks 4.5 and 4.6beta standard edition 

    2018-04-10_11-03-25.jpg

  2. (You could also try releasing after hiding ) :) Its working thanks you people for helping

    Script.health = 15.0 --float "Health"
    Script.useOnce = true --bool "Use once"
    Script.ReleaseTimer=0
    Script.ReleaseDelay=5000--float "Corpse Time"

    function Script:Start()
        if self.health < 0 then
            error("Health can't be a negative value.")
        end
    end

    function Script:UpdatePhysics()
        if self.ReleaseTimer ~= 0 and self.ReleaseTimer < Time:GetCurrent() then
           self.entity:Release()
        end
    end

    function Script:Use(player)
        if player.script.health < player.script.maxHealth then
            player.script:ReceiveHealth(self.health)
            if self.useOnce then
                self.entity:Hide()
                self.ReleaseTimer = Time:GetCurrent() + self.ReleaseDelay
            end
        end
    end

    • Like 1
    • Upvote 1
  3. when i use self.entity:Release() the exe crashes when playing and use the health when i keep the player in idle anim its not crashing but when i move or rotate player with weapon the exe crashes, can someone say how to use it

    i use it in Health pickup when enemy dead it pops out of the enemy a health box, tutorial was on youtube

    i am new to lua i am a beginner here is the healthpickup script

    Script.health = 15.0 --float "Health"
    Script.useOnce = true --bool "Use once"

    function Script:Start()
        if self.health < 0 then
            error("Health can't be a negative value.")
        end
    end

    function Script:Use(player)
        if player.script.health < player.script.maxHealth then
            player.script:ReceiveHealth(self.health)
            if self.useOnce then
                self.entity:Release()
            end
        end
    end

×
×
  • Create New...