Jump to content

Haydenmango

Members
  • Posts

    438
  • Joined

  • Last visited

Everything posted by Haydenmango

  1. The building/farming animations/models look good. I also like where you are going with the stealth. A suggestion I have is you could make a threat level for your enemies. So instead of entering/leaving stealth automatically you instead increase/decrease your enemies threat level when you are in/not in a stealth area. Once their threat hits 0 they stop attacking. Once their threat hits a certain number they start attacking. I think something like that would make stealth really fun, especially if you had a detection meter to show when something is gaining/losing threat. Looking forward to more updates!
  2. Hey so I was wrong about the AnimationManager not working with the MakeHuman model. I was tired and simply didn't put - function Script:Draw() self.animationmanager:Update() end inside of my models script. After placing that in my models script the AnimationManager works fine.
  3. Aha! Yeah the animations all work fine up until I try to run it in game. I will attempt to load up my model again without checking those options and let you know if it works. --edit After exporting my mesh from MakeHuman without checking the "Export for Rigify" and "Rotation Limits" options I got my model to animate in game!
  4. Well I have tried it like that as well with no luck. The model deforms horridly. That is why I think there is some sort of hierarchy issue. I can animate all my other models with the code I showed above which also throws me off. Ah well I must be doing something wrong somewhere..... hmm when exporting from MakeHuman do you chose the rigify option and/or the rotation limits option?
  5. Nice tutorial! I was just starting to use MakeHuman and then I found this, very useful information. BVH hacker tool is great as well! I do have one question though, how do you go about playing your animation in game? I got my character into leadwerks (gave every material animation shaders) and the animations play inside of the model viewport but when I try to make the animations play in-game my character does nothing. My script is really simple just like this-- import "Scripts/AnimationManager.lua" function Script:Start() self.animationmanager=AnimationManager:Create(self.entity) self.animationmanager:SetAnimationSequence(1,.05) end I am guessing it is some sort of hierarchy issue but I am not sure yet. My character is wearing jeans and has hair, do I have to do anything special to get that to work correctly?
  6. You could also mess with giving the ball a higher mass, adding more or less force in that script, or even changing your worlds gravity amount.
  7. It seems that those are older functions from LE 2. At the moment I do not believe such functions exist (at least for lua). I had a similar issue so I made a little script for my ball to make it bounce. It looked like this - function Script:Collision(entity, position, normal, speed) self.entity:AddForce(0,.25*speed,0) -- Add Global force to make the ball bounce upwards. self.entity:AddForce(0,.25*speed,0,false) -- Add Local force to make the ball have a random bounce end
  8. Hey shad just wanted to ask if self.shader:SetFloat("cloudscale",self.cloudheight) -- lesser is bigger is supposed to be self.shader:SetFloat("cloudscale",self.cloudscale) -- lesser is bigger in the UpdateWorld() function.
  9. @gamecreator - No Problem! If I knew C++ I would post a version for that as well. @Josh - I just got bored and decided to give it a try because it really changes the way I build my map. Now instead of placing rocks to block paths I can just place steep terrain slopes! As soon as it is officially implemented I will gladly throw this code out because I have found certain issues. Issues Found: On certain slopes the slide will push you up the slope instead of down due to the pickInfo.position not always hitting the correct spot which makes you face the slope and move forward instead of facing away from the slope and moving forward.... I am starting to think that using a check in a Collision() function might work better for getting a position than doing the pick but I haven't tried it yet. Most of the time it can be fixed by sculpting your terrain a bit more in the areas where you have trouble.
  10. That looks like a lot of fun! I love classic shooters. Also the evil faces on the gray asteroids are hilarious.
  11. I finally got around to adding this to my project. It looks sooo amazing. You are the best Shadmar thank you!!! Here is a little preview of what it looks like in game. It is speed up to be 5 times faster so the video wouldn't be super long.
  12. I figured out how to do a basic terrain slide for the character controller using some code! I thought someone might find this useful since character controllers can climb really steep slopes at the moment. Code: local pickInfo=PickInfo() local campos=self.camera:GetPosition() local playerPos = self.entity:GetPosition() if (App.world:Pick(campos,playerPos-Vec3(0,1,0),pickInfo,0,true,Collision.Scene)) then if not pickInfo.entity.script then if pickInfo.normal.y<.41 then local dir = Vec2(pickInfo.position.z-campos.z,pickInfo.position.x-campos.x):Normalize() self.entity:SetInput(-Math:ATan2(dir.y,-dir.x), 10+pickInfo.position.y, 0, 0, false, 1.0, 0.5, true) campos = Vec3(playerPos.x, campos.y ,playerPos.z) if campos.y<playerPos.y + self.eyeheight then campos.y = Math:Curve(playerPos.y + self.eyeheight, campos.y, 2) else campos.y = playerPos.y + self.eyeheight end self.camera:SetPosition(campos) return end end end Usage: This code goes in the UpdatePhysics() function and must be placed before your characters SetInput() function to override it. The value here - if pickInfo.normal.y<.41 then - (.41) can be changed to a value between 0 (you can climb anything) and 1 (you can't climb anything). Also the value here - SetInput(-Math:ATan2(dir.y,-dir.x), 10+pickInfo.position.y, 0, 0, false, 1.0, 0.5, true) - (10+pickInfo.position.y) can be changed to make you slide faster or slower. The way the code is set up it only checks for entities without a script with Scene Collision which includes terrain. Example Usage: if window:KeyHit(Key.Space) then jump = 9.2 self.entity:EmitSound(self.sound.jump,5,.12,1,false) playerMovement = playerMovement * 1.9 else local pickInfo=PickInfo() local campos=self.camera:GetPosition() local playerPos = self.entity:GetPosition() if (App.world:Pick(campos,playerPos-Vec3(0,1,0),pickInfo,0,true,Collision.Scene)) then if not pickInfo.entity.script then if pickInfo.normal.y<.41 then local dir = Vec2(pickInfo.position.z-campos.z,pickInfo.position.x-campos.x):Normalize() self.entity:SetInput(-Math:ATan2(dir.y,-dir.x), 10+pickInfo.position.y, 0, 0, false, 1.0, 0.5, true) campos = Vec3(playerPos.x, campos.y ,playerPos.z) if campos.y<playerPos.y + self.eyeheight then campos.y = Math:Curve(playerPos.y + self.eyeheight, campos.y, 2) else campos.y = playerPos.y + self.eyeheight end self.camera:SetPosition(campos) return end end end self:UpdateFootsteps() end self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , self.crouched, 1.0, 0.5, true) Let me know if there is a better way to do this and Enjoy!
  13. in your script is self.Gladios equal to anything? You need to make it reference the prefab if you haven't done that. Something like - Script.Gladios=Prefab:Load("Project/Prefabs/prefabname.pfb") If that isn't the issue then could I see how your script looks now?
  14. One thing before I go on; are you using the Indie Edition (Lua) or Standard (C++)? Everything I am saying is relative to Lua but it can probably be translated to C++. edit -- it seems you are using C++ so this example code I'm posting won't copy over exactly. You will need to change it a bit to get it to work. Is close but I was implying you could create a table for your items. This would make the number correspondence much easier. For example in your Start() function you can assign numbers to a "item" table. In code it would look like this - function Script:Start() self.item={} --self.item is now a table self.item[1]=self.gladios --the first item in your table is gladios now self.item[2]=self.weapon2 --add other weapons self.item[3]=self.weapon3 end Then when you want to instance(spawn) one of those items randomly you would do - local item=self.item[math.random(1,3)]:Instance() This makes a new Instance of one of the items assigned to your self.item table using a random number. You can replace math.random(1,3) with whatever number your random number generator creates. Yeah the method I described in my first post is better for spawning things like resources outdoors because it requires space for the entity to drop into place but it does set the entities mass back to 0 once it hits the ground which prevents rolling and other physics things. If you have a fixed location for your spawn points you should be able to just adjust the entities rotation before placing it into position with SetRotation(). That requires a bit of testing to find the perfect rotation for the set spawn point but it should work fine once you get it.
  15. Well there is no easy AlignToTerrain() function that I know of so for making the item spawn on the correct axis you will probably need to do some coding. What I do in my game is spawn the item above its location and give it a mass of above 1. Then once the item hits the ground its mass goes to 0 and it sits still. It would look something like this in code - local item=self.item:Instance() --spawn item item:SetPosition(self.itemlocation+Vec3(0,1,0)) --set Item above spawn location item:SetMass(1) --set Items mass to 1 so it begins falling item.script.falling=true --set falling to true so that the items Collision() function will work function Script:Collision() --this collision function needs to be within the Items Script. if self.falling then --check for falling if entity:GetCollisionType()==Collision.Scene and not entity.script then --terrain check self.entity:SetMass(0) --set mass to 0 to become still end end end That won't work for everything but maybe it will help a bit. For getting numbers that are relative to items you would need something like this to spawn the item - local item=self.item[self.itemnumber]:Instance() Let me know if this helps at all!
  16. Or http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerasetzoom-r207 ?
  17. I can confirm that this is some sort of bug. I just tested the map and got the same results. Navmesh isn't covering the csg boxes and it isn't following the terrain. This was fixed. - http://www.leadwerks.com/werkspace/topic/10033-nav-mesh-isnt-big-enough/
  18. Okay for vegetation you need these settings for the material - BlendMode: Solid Two Sided: Yes DepthTest: Yes DepthMask: Yes This is probably because your BlendMode was set to Alpha. For the character Issue try to go to the Physics Tab and set the Character value to 180.
  19. Yeah I have been having this issue as well for quite some time, I had forgotten to post a bug report though. Here is another post that discusses the same issue. - http://www.leadwerks.com/werkspace/topic/10140-scene-tab-suggestions/
  20. My Top 3 would be 1. Water, 2. Character Controller Improvements, and 3. Vegetation System. Following right behind that would be Editor Optimizations (Mostly the Scene Tab) and Publishing Improvements (package compression and encryption in publish process).
  21. Well I am not sure what exactly you want to do but here are some of the functions you would use - Camera Zoom - http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerasetzoom-r207 Point at Entity (center in on entities) - http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitypoint-r167 Move (good for panning and general camera movement because it doesn't detect collision) - http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitymove-r165 Turn (Use this instead of SetRotation() to turn the camera over time) - http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entityturn-r29 There are many more (SetRotation(),SetPosition(), etc.) but these should be good enough to make a simple scene.
  22. It would be cool if the Listener could control the Master Volume of every sound in a game. Like if I could do self.listener:SetMasterVolume(0-100). 0 would be No Volume while 100 would be Maximum Volume. This would make volume control much easier than having to manually decrease/increase the volume for each sound every time they are played.
  23. I just noticed that the jump.wav sound file in the MyGame project is a stereo file yet the FPSplayer.lua script uses it with EmitSound() and it still plays the sound. Also I have been using many stereo sound files in my project along with EmitSound() and all the sounds still play. Does playing a stereo sound file with EmitSound() create any problems? I tested it out and it seems like the 3D sound doesn't work although the sound still plays.
  24. Also, I think that only developers can make blog entries. I would like to use blog entries rather than status updates for certain things.
  25. Hmmm after playing my game today I noticed that my torch fire particle emitter would stay in sight instead of disappearing! Was this changed recently?
×
×
  • Create New...