Jump to content

Haydenmango

Members
  • Posts

    438
  • Joined

  • Last visited

Everything posted by Haydenmango

  1. As for lives you could store the number of lives as an integer ex: player.lives=5 and everytime your player dies you can subtract a life. if player.alive~=true then player.lives=player.lives-1 if player.lives<1 then game over else player.alive=true end
  2. Sounds good. Also a side note- I did not make any textures for my animated model (as it was just to see if animations worked) so when I imported the model all the materials were blank and the editor said it couldn't load the shaders for the materials sooo that is what made me go looking around in the shader folders. I am not sure if the materials/shaders will generate or not if you have textures with the model you are importing.
  3. Yeeahhh! Well I feel really great and extremely dumb. For the last month and a half-ish I have been making very gross models and other constructs using Blender. So 2 days ago I decided to take it to the next level - Rigging and Animating a Human. Well after hours of watching youtube tutorials and rotating/moving finger bones I had a fairly usable model. Then I put a shotgun in his hands. Then I animated it. Animating is fun. Anyways... Once I import my animated human guy with shotgun he was initially blank. I looked for animations in the model editor buuuut there weren't any! I was in shock and disbelief. I quit working for the night after tweaking around a bit. Next morning my head is full of questions .."Why doesn't it work?"... .."What could it be?"... ..."What must I DO!?!?!?".... I go onto Leadwerks while still in bed and change the default.shader to the diffuse+normal+specular.shader in the shaders/model/animated folder. It works. The End
  4. Thanks everyone for the advice! So a list of things I had wrong that are now fixed with solutions. 1-Pick Height was to Low solution=raise the Y of the starting and ending points of the Pick (thank you Rick) 2-Pick would stop at Picking Entity solution=SetPickMode(0) Before picking then SetPickMode(1) when finished (thank you Tjheldna) I still have an issue where the Pick will not recognize my player(the target) for whatever reason so until I fix that my code is similar to this- if pickInfo.entity ~= nil then move to player elseif pickInfo.entity== nil then attack player end If the pick recognized my player then I would do if pickInfo.entity==player then attack player end
  5. Hi Rick! Thanks for the quick response. Well I made the a sphere that moves to the pick location and it always appears right on the picking entity. I think Hiding the Picking Entity and raising the Pick Height should solve the problem because it seems the picking entity (or the ground right in front of the picking entity) is blocking the pick from reaching its target currently. I am going to go see if this works in a little while, thanks again!
  6. Hello leadwerks community! I have been trying to find a good way to add Line of Sight to ranged enemies. At the moment I can get them to attack from a decent range by taking the MonsterAI.lua script from the tutorials and changing the attack range to a higher number. Now I run into the issue of the enemies being able to attack me when I am behind objects like walls/trees/etc. So I have attempted using the Pick() function but I just can't seem to figure it out. Can anybody out there point me in the right direction or give me some ideas for how to do this? Any help would be much appreciated.
×
×
  • Create New...