Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About graycontrast

  • Rank
  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. right, I am using 3-D models in a 2-D interaction. But doesn't Pick just stops at the first object in a cylinder? is there a way to do it in a 2-D area or will I have to use multiple pick commands in evenly-spaced angles?
  3. 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. 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?
  4. I had a problem with shadows from animated models being cased while playing an animation. I had to change the visibility to 'far' from 'max' ref http://www.leadwerks.com/werkspace/topic/14918-putting-a-script-on-my-player-removes-their-shadow/
  5. okay, I changed it from 'max' to 'far' and it started to work. Thank you all for your help! I wonder if this is a bug.
  6. ok I made a test floor you can download it here: (REMOVED) and here is a screen shot of it not working for me
  7. 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.
  8. I put the moter.LUA script on the model and it cast a shadow while it is spinning, but it doesn't cast a shadow while it is playing an animation (walking, idle, est.)
  9. I checked all the materials and they are in the animated folder and they all have the cast shadows ticked
  10. the materials for the character all have the "diffuse+normal.shader" for the shader and "shadow+animation.shader" for shadows
  11. I am making a platformer with lights that cast dynamic shadows and when I put a script on the player model it no longer cast shadows. I tried with my custom script and the packaged "SimpleAnimation.LUA" when I attach it the shadows are no longer being made. I check the the model and light are both set to dynamic no script with "SimpleAnimation.LUA"
  12. I was able to get it to work. my call for the Fire function was wrong. it was self.Fire() not self:Fire()
  13. 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
  14. 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?
Facebook Twitter Youtube Github Steam
  • Create New...