Jump to content

graycontrast

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by graycontrast

  1. So a good way to start is say have a pick from the top and bot of the character? That should be a cheap way to get LOS, I don't plan on having any narrow holes you can shoot through. Should I save that information as vertices in the bad guy script? and to be more efferent I don't want to have to check every bad guy (like ones behind the character or way way down the map), just the ones in a certain range. Is there a way to collect the objects in a certain range without iterating through all the entities in the world?

  2. I am looking to implement a line-of-sight targeting in a 2-D platformer where the player presses a 'ready gun' button, moment is disabled, and a list of hitable targets is made and you can cycle through the targets.

     

    post-17593-0-81173500-1471661323.jpg

     

     

    Is there a way to use ray tracing or the pick command in a 2-D area that will stop at every non-target object?

     

    If I can get those results I can make an array of targets to cycle through them.

     

    What is a good way to start?

  3. I tried some troubleshooting by updating my GPU drivers, activating beta, scaling the model, and using the crawler monster none of it worked. The only thing that happened was I was able to get a shadow from one spot light, but the shadow went away when I added a player controller script. my player character and the pre-packaged crawler is not casting shadows while playing animations.

     

    post-17593-0-49567400-1470704990_thumb.jpg

  4. here is my function.

    function Script:Fire()
    local bullet = Prefab:Load("Prefabs/Projectiles/testBullet.pfb")
    local pos = self.entity:GetPosition()
    local rot = self.entity:GetRotation()
    bullet:SetPosition(pos)
    bullet:SetRotation(rot)
    end
    

     

    and I am getting an error that says " attempt to index local 'self' (a nil value)" when trying to use self.entity:GetPosition() or self.entity:GetRotation() I am not sure why self is nil in this function. those commands work in the other functions

  5. I was able to create a prefab when pressing the fire button using the "Prefab:Load" however my problem now is that it spawns at the prefab's default position and direction. How can I get the player's position and direction so I can add a self.entity:SetPosition(x,y,z) and self.entity:SetRotation(x,y,z) to the projectile script? Is there a way to pass that to the prefab as I load it? Or will I have to search the world entries?

  6. I am trying to create a platformer game where you can run, jump and shoot projectiles (lemons like in megaman).

    I am using 3-D models restricted to a 2-D plane. I already have my character running and jumping, however I am having a very difficult time trying to get shooting. I am not sure how to start. Should I have the chatterer controller script generate the projectiles? Can I make a global trigger that follows the character and emit the bullets? I am not sure where/how to generate the projectiles and where/how to do collision detection. can I have it shot a .pfb that I have made, or will it have to be a basic shape, or sprite? Thanks!

×
×
  • Create New...