Jump to content

karmacomposer

Developers
  • Posts

    447
  • Joined

  • Last visited

Posts posted by karmacomposer

  1. When you bring a medkit into Leadwerks as of the new beta, they float into the air when running the game.  Attaching this script makes Leadwerks crash to windows when trying to use the Medkit.

    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

    This worked 100% in the stable version of Leadwerks 4.6.

    Mike

  2. I tried creating a steam vent in Leadwerks using particles and it just looks too blocky or bubbly (word?).  I want realistic thin whispy steam (like controlled fog) in a conical shape that seems to be seeping out from a pipe.

    Any advice or presets for this?  If someone could just tell me what kind of particle and what settings would make this work would be a godsend!

    Thank you.

    Mike

  3. Actually, the elevator would be a level or you could use LE's excellent world builder to create a very large vertical shaft and then drop it very slowly to make it seem to go farther than it actually is.  You could use animated textures to also give the illusion of travelling down.  The shelter could be at the bottom.  If you want rocky walls, there are cave construction kits that have this in a modular fashion.

    Look at www.arteria3d.com for excellent modular kits for Leadwerks.

    Mike

  4. Voxel terrain is a fantastic way to create caves, overhangs, cliffs and entire procedural games in some instances.  Look at products like VoxelFarm, which can be implemented at an extra cost for various games engines and has a SDK.

    I would love to see Voxel Terrain implemented in Leadwerks.]

    Mike

  5. What you are asking for is called voxel terrain.  Leadwerks does not have voxel terrain.

    You COULD create a ground plane and then programmatically perform a CSG substraction for the hole (not sure if you can perform editor function in code).

    But what you are really looking for is voxel terrain - which allows you to add or subtract terrain through the use of blobs - not to be confused with minecraft, which is a blocky version of voxel editing.  There are engines and tools to create voxel terrain, but only an engine would allow you to terraform in realtime.

    For Unity:

    https://www.assetstore.unity3d.com/en/#!/content/8131

    VoxelFarm:

    http://www.voxelfarm.com/index.html

    We can ask Josh if he can implement VoxelFarm into Leadwerks - right now it's available for Unity and Unreal out of the box and it does have a SDK.

    That's about it - there are a LOT of solutions for Unity, but none for Leadwerks.  I, for one, would LOVE to see voxels implemented in Leadwerks.

    Mike

    • Upvote 1
  6. I have instantiated water, but how do I have items have buoyancy?  I need debris to be in and floating on top of the water.

    I'd also like to have the water greenish and hard to see through.  When I use the color picker and alpha values, I just get highly reflective water.  Is it possible to alter the water through programming?  Obviously, water is a big part of this level and Leadwerks has VERY limited water.  It would be great to have water with physics and lots of options (rivers, oceans, waves, etc).

    Mike

  7. I'm looking to create a dark green fog that is very dense (sewer system), but I keep getting a too bright green when dense or almost no fog when I let up on the alpha value. I am confused as to HOW to get the RGBA values - it's not like I can grab them from photoshop and input them - they seems to be 0.v, 0.v, 0.v,0.v where v = some value. I know they are in order (R, G, B, A), but I have no idea how to get a specific color with this format.  How do I set this predictably?

    Here is the code:

    --Set Fog


        self.camera:SetFogMode(true)
        self.camera:SetFogRange (0,25)
        self.camera:SetFogColor (0,0.10,0,0.5)
        self.camera:SetFogAngle (0, 180)
        self.camera:SetClearColor(0.0, 0.0, 0,0)

    What is the correct settings for a very dark green dense fog (and i'd love floating particles in the air as well - how would I do this in Leadwerks?

    Mike

  8. Would it be possible to create a low poly surface model whether inside Leadwerks with the built in modeler or outside Leadwerks and then apply a water shader to that and adjust amplitude and what not to create waves?

    I wonder if it would be possible to define a under-water-like scene when going underneath the low poly surface with caustics and reduced gravity/physics - as if under water.  How would we best achieve this since Leadwerks does not have this...yet?

    Mike

  9. I know from reading the forums and docs that fog is part of the camera, but not sure how to turn it on/off, color it and set it's range, etc.

    I am using the FPS player camera and there are no functions for fog in it.  Do I have to add it by hand?  Is there a set of code fragments on how to do this?

    Also, does it work indoors?  I have a sewer system in place and I would love to have a bit of fog on the floor that is semi-transparent.  Can this be done and if so, how?

    Thanks.

    Mike

  10. Or, you could model vegetation (say, a tree or some bushes), to be destroyed by cutting up the mesh into chunks (some modeling programs let you do this).

    Then, place the normal veg and when hit, replace it in code with the destroyed veg (and I would have a bit of code that explodes the chunks and some particles to make it more exciting).

    Mike

  11. Ok, so here is my script:

    Quote

    function Script:Start()
        --Load a sound
        self.sound = Sound:Load("Sound/Characters/demonscream_mono.wav")
    end

    function Script:Collision(entity)

    --Play an animation
        self.entity:PlayAnimation("screaming",0.05,500,1)

            if self.sound then
                --self.sound:Play()
                self.entity:EmitSound(self.sound,50,0.002,1,false)
            end

    end

    function Script:Release()
        --If the sound was loaded, release it now and set the variable to nil
        if self.sound then
            self.sound:Release()
            self.sound = nil
        end
    end

     

    So, it works, but it seems to loop the sound despite the boolean loop set to false.

    Also, what is the difference between play() and emitsound?

    If I use the self.sound:Play() then the volume is awfully loud! I cannot seem to set the volume or I am not doing it right.

    The other command I can alter the volume but it seems to play it looped and temporally slow. I need to play as intended.

    It's a roughly 8 second mono 44.1khz 16 bit wav file.

    How can I use the self.sound:Play() and lower it's volume to say, 10% as a one-shot, not looped? How can it get softer in volume as the player moves away from the entity that the sound played from?

    Mike

  12. Hi guys.  What is wrong with this:

    Quote

    function Script:Collision(entity)

    --Play an animation
    self:PlayAnimation("screaming",0.05,500,1)

    end

     

    I have this as a lua script. If you walk up to a figure, it's supposed to animate as a one-shot.  There is only one animation - 0 - called "screaming"

    I get the following error when you walk up to the figure:

    Quote

    Script Error

    attempt to call field 'PlayAnimation' (a nil value)

    Line 4

     

    What am I doing wrong?

    Mike

  13. I just want a bunch of rats scurrying around - very creepy.  I do have to figure out the animation frames, but in the end, I just want them upsetting the player but not hurting them.

    Right now, the zombie ai script works but hurts the player and anything I attach that script to attacks once and then stops and just rotates around the player when you walk by an entity that already attacked you.  Very weird.

    I was able to lower the amount of hurt to 1 and I assume a value of 0 will not hurt the player at all - but the rats (and spiders) just stop after - never to attack again.  I want them to stop for a moment or two and then come after you if you are close enough for them to 'see' you.

    Mike

×
×
  • Create New...