Jump to content

X54321

Members
  • Posts

    40
  • Joined

  • Last visited

Posts posted by X54321

  1. I hate to be Captain Obvious, but did you wait a while after the window disappears? Did a loading screen pop up?

    Otherwise, maybe try going to "C:\Program Files (x86)\Steam\steamapps\common\Leadwerks Indie Edition"

    and looking at Leadwerks.exe. Try right clicking and see if there's an option for running with a different graphics

    processor. If it's there, try to hover over it and select Integrated graphics. Also, try running it as an Admin.

    It seems that a lot of software hate Nvidia cards, especially on laptops, but it works for me WITH Nvidia, so I don't know

    what the problem is.

  2. You know how in most paint programs you can drag a box and it'll select everything in it? I think Leadwerks needs this to be implemented (for the 2D views at least). Selecting brushes one by one can get quite annoying with highly detailed structures.

    • Upvote 2
  3. After attempting to make a rotating platform script, I wondered how the platforms in the moving platforms example kept the player on top of them. I've looked through the script of both the moving platform and the fps controller, but I can't pinpoint what in those scripts make this happen. Does it have to do with the physics properties?

  4. For 2.5d games, I want to be able to restrict physics rotation & movement to certain axes. It should be kind of like how Unity does it, where the physics tab has checkboxes for each axis you want to restrict. You can just use self.entity:SetPosition() to restrict the axis, but this causes the physics to be...slow. It's not lag, but the physics object itself moves in a very strange fashion. It gradually slows down until it hits a complete stop, and then it speeds back up again.

  5. The render distance appears to be stuck at a very small value. It won't change no matter what I set the camera's range to. I also tried setting all of the object's view ranges to infinite and it didn't do anything. So far this has happened with two projects, one of them I just started. The render distance is fine in the editor, but not in the game. Any ideas? I'll post my project in a second.

     

    Here's the project link : https://drive.google.com/file/d/0BzyMN5S2kRTHdV9kbnM4RHpIdDQ/edit?usp=sharing

  6. First and foremost, here is my project file : https://drive.google.com/file/d/0BzyMN5S2kRTHbGdadzZwY0Q2SDg/edit?usp=sharing

    I have a basic first person shooter setup, and I have a turret that faces the player and fires missiles every few seconds. Everything is fine and dandy, except for the fact that the missiles will not collide with the player unless said player is moving. I have posted this question in the Programming section, and it seems there is no rhyme or reason as to why this happens. I know this isn't a problem with the missile going too fast, it collides with the walls perfectly. Again, the missile DOES collide with the player if he's moving.

  7. Well, the script worked, but it did absolutely nothing to solve the problem. I already had missiles that did exactly what I wanted them to do. They just happened to go through the player if he stood perfectly still. With this new script, the missile still goes through the player if he stood perfectly still. So, this didn't solve the problem at all, but thanks anyways.

  8. Do you understand it's Lua code ? Perhaps you need to first learn the Lua basics and how all works ?

    All necessary code is on the Turret example i posted.

     

    I can help you, so i just need something simple :

    Post in a Zip file :

    - A simple turret and script your use

    - The missile and script for it

    - The player ans script it uses

    I'll take that modify it in a very simple working solution, try that.

     

    Because if i post even a complete working example, i'm not sure you should able to re use it ?

     

    Wow, that was mildly insulting. Good thing I already had the zip file prepared. https://drive.google.com/file/d/0BzyMN5S2kRTHb1VQOWRGQ0J1VVk/edit?usp=sharing

  9. You should not do this : never change entity type :

    if entity:GetKeyValue("type") == "player" then
    entity:SetKeyValue("hit", "missile")
    end

     

     

    Have you looked of the turret link example i posted ?

    It has bullets and player code.

    When you fire a missile, just load a prefab missible entity containing script and putting its type to missile

    In it's collision function just look if entity collided type = player

    If yes, decrease player health, and Release missile entity.

     

    If you post a small minimum player/missile code i can dowload and test in LE3 i will debug it, but it seems it's coming from your code dealing with type not a physc problem settings.

     

    I wasn't changing the entity type. It's rather complicated and messy. I made this code when I was testing to see if it would work if I detected collisions from the missile instead of the player. The

    entity:SetKeyValue("hit", "missile")
    

    is actually a sort of relay. This was before I found out you could directly access an entities' script. I will post some more code shortly, I need to eat lunch.

  10. Yes, I have set the type for my player in the code. But, the bullet is programmed to remove itself if it collides with anything other than an enemy.

     

    Here's some code for ya :

     

    function Script:Collision(entity, position, normal, speed)
    if entity:GetKeyValue("type") ~= "enemy" then
     if entity:GetKeyValue("type") == "player" then
      entity:SetKeyValue("hit", "missile")
     end
     self.dead = true
    end
    end
    

     

    function Script:Start()
    
    self.entity:SetGravityMode(false)
    self.entity:SetMass(1)
    self.entity:SetKeyValue("type", "missile")
    self.entity:SetCollisionType(Collision.Prop)
    --self.entity:SetSweptCollisionMode(true)
    self.dead = false
    end
    

     

    function Script:UpdateWorld()
    self.entity:Move(-0.25, 0, 0)
    if self.dead then self.entity:Release() end
    end
    

     

    Anyways, the missile's physics properties are defined in the start code so I don't have to modify the prefab. It's a rigid body, and has a box for collision.

  11. Works same for player or other entity, you must work with SetType at start and GetType on Collison(..) function to just take account the entities type you need.

     

    I have already been doing this.

     

    I have adjusted the physics of the missile so now it at least collides with the walls & such. HOWEVER, it still won't collide with the player unless the player is moving. If the player stands perfectly still the missile will go right through him.

  12. Well here we are again. It's always such a pleasure. So, I have these turrets that shoot out missiles. They do as they're supposed to and sail in the direction they are shot. HOWEVER, it doesn't seem to collide with anything and only collides with the player if the player is moving. I have the collision type for the missile set to 'Prop'. I have tried the 'Projectile' collision type, and it just makes it not collide at all. I have tried detecting collisions from both the player's script and the missile's script. The missile also has Swept collision enabled, a mass of 0, and gravity turned off. I am using Move(x, y, z) to move the missile within the UpdateWorld() function.

×
×
  • Create New...