Jump to content

_Assassin_

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by _Assassin_

  1. 8 minutes ago, Genebris said:

    Better do this:
     

    
    if self.wasAirborne and not self.entity:GetAirborne() then self.landSound:Play() end
    
    self.wasAirborne = self.entity:GetAirborne()

     

    Genebris your a genius! You have managed to do what I did in 11 lines of code in just 2. I have been actively trying to solve this issue for 2 days and you do it in a moment. I cannot thank you enough! :)

    • Upvote 1
  2. Hello again,

    I finally got footsteps sounds to work properly on the correct material using triggers. But I have been unable to get a sound to be played at the correct time when the player jumps and lands on a material. How would I implement such a feature using a trigger?

    EDIT: I manged to work this out in the end. I did this by making global variables of both the players jump status with the GetAirborne command and the players current speed using GetVelocity():Length command. I then made a jump trigger box combined with the necessary commands for collision detection. Upon player collision, my jump trigger sets a global isJumping variable to false (isJumping is set to true when the player leaves the jump trigger). Finally I added an if statement to check if the player is airborne and moving, if this is true then I set the isJumping variable to true. (Making sure to make an if statement in the character controller to play the landing sounds when the isJumping variable = true). Not very efficient at all but it does as it is intended. As this is my first project and experience with LUA I feel I can get away with it until I can think of a better method. ;)

    If anyone else is having this problem feel free to shoot me a message and I'll gladly tell you what I did and even share my code with you. :) 

  3. Hello everyone, 

    I'm trying to create a raycast for my game in order to play specific sound files depending on what material the player is walking on. I have been unable to successfully create a simple raycast and have no idea where to start. Is there a simple tutorial anywhere to create a raycast on a 3D object in Lua?

  4. Strange, you would think a 3D game engine for the development of first person and third person games would have something as fundamental as support for crouching. Not that I'm complaining or anything as that is way above my technical level anyway xD. 

    You could emulate some sort of crouching mechanic by moving the camera I suppose, as long as you were using the first person perspective and made the player model invisible that is. Not a very smart way to do it I know, but you could at the very least make it look like you are crouching but very little else.

  5. I'm a novice user of Leadwerks and am having trouble suitably texturing a simple room I made using the software. I quite simply want to texture the walls in my level with several different textures applied to the same wall in a specific orientation. 

    Which I only managed in two ways:

    - Sectioning a wall into smaller objects, applying materials to them and piecing them together.

    - Exporting my entire map as a .obj file to blender in order to texture generate a UV map to import back into Leadwerks.

    As you can probably tell it's not very efficient and will quickly clutter up my project.

    Is there a better way I can texture my simple level?

  6. I just recently got into development with the Leadwerks engine and am interested in developing a project from the First-Person perspective. As I am new to Lua and an inexperienced programmer (programmed some office-based applications in VB.NET) I am unsure how to get started. The only tutorials I can find specifically on the scripting of a character controller is over 6 years old. In short: What are the very basic requirements for creating a simple character controller?

×
×
  • Create New...