Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. Great !! This should be an useful tool like blender export addon, I am looking forward
  2. Thanks for your reply. Glad to know that it is possible to solve my problem. Yes I have Professional Edition but most of time I use Lua instead of Cpp, so that my knowledge about using Cpp and library stuff is kind of low. Hehe hope someone will make this feature, it should be useful
  3. Some textures which I found from workshop have no source image files therefore I can't modify or make normal map for them. My trick is open tex files in Leadwerks > maximize texture editor window > Print screen > Paste screenshot to Gimp > Edit, save. But this is only good for textures below 512 x 512, above 1024 x 1024 can't be zoomed big enough to do this trick. Is there any tool or method too get images from tex files
  4. Accidently, I found out how to solve this. when using Entity:SetAnimationFrame, adjust blend value from 0 to 0.1 and it is done! bone:SetAnimationFrame(Time:GetCurrent(),0.1,"animation name")
  5. Hi everyone, I have a character model with an animated arm. I want character's neck bone to rotate following my mouse look rotation. Everything seems to be ok if I don't use entity:SetAnimationFrame, character head rotates nicely. But when I apply entity:SetAnimationFrame to animate the arm, I can't control neck bone anymore. Animation of character's arm is normal. How can I seperate animated arm bone from neck bone to use both animation and manual control
  6. Hi everyone, please help I want to make a small 3D icon above my object and I can see it through wall, wherever I am Example: a NPC is running around in my map then I can track the icon to find him Notice that It should be a 3D object not 2D. I wanna make it rotate too
  7. Hello everybody, yesterday I read an email from steam about workshop item sale to 50% Then I bought BloodDecal by using my steam wallet After that I did not find any BloodDecal in my inventory, even I display "View in your inventory" Anyone tell me where is my bought item ? and how to use it in my game ? Thanks
  8. Hi everyone, Here is my custom FPS player concept with leaning ability (Figure 1) This concept includes 1 camera, 2 boxes (box1 and box2), very simple Expected: I can control the camera by mouselook script - DONE (It is easy) Box1:SetCollisionType(Collision.Character) Box1:SetPhysicsMode(Entity.CharacterPhysics) Assign WDAS control to Box1, Box1 can turn on Y Axis, following camera rotation - DONE (It is easy too, using Entity:SetInput() in Script:UpdateWorld()) camera:SetParent(box2) so that when box 2 rotates, camera will be rotated too (Figure 2) Press Q/E to rotate (Entity:Turn) box 2 on Z Axis Problem: Leaning is ok when I don't change camera rotation, just leave the mouse there and press Q or E, my camera will move well, the result is I can peek out the wall. When I move mouse to look around, Box1 (player base)'s direction changes too, but Box2 is standing still. the result is I can't lean as the right way (Figure 3) My failed solutions: Solution1: Using Box2:SetRotation(camera:GetRotation(true)) in Script:UpdateWorld(), this can make Box2 rotate as camera's rotation, but I can't use Q or E to turn Box2 anymore. Just because its Z axis was "locked" by Entity:SetRotation() Solution2: Create a local Target = Model:Box() and place right on the line of sight from camera, so that when camera turn around, Target will move too, then use Box2:Pick(Target,2) to align Box2's Z axis with a hope that I can use Q or E again but no help, it was locked too by Entity:Pick() Solution3: Using Box2:AlignToVector() but it acts so weird, I can't use Q or E too. Finally, I think I need my Box2 can be rotated only on Y axis (follow camera rotation in global) but Z axiz is still free to be turned Any idea for my concept ? Please show me a better one or give me some advices to use a right function, I will appreciate
  9. 1 week passed and finally, I have done this "Bones and Mesh" Here it is, the combination of mesh's original bones from blender and my own bones system, they work with eachother perfectly. I find out how to dismember character's limbs too. WIP thank you so much nick.ace!!
  10. I feel a bit confused now. It will be nice to use FindChild() but I have some problems with my exported mesh. It was made in Blender and exported by "Exporter for Leadwerks" addon to .mdl and .mat files. I open Leadwerks Model editor and find out that all of my character's bones were removed. So here are my questions 1. If I use Addon to export from Blender, is it possible to attach my ragdoll bone to the exported mesh (with no bones from Blender) ? 2. If I export to .FBX, yes, all of original bones are still there, showed in Leadwerks's model editor, do I need to "recode" them? And my model's skinning is still operational ?
  11. Yes, I want a violent gameplay muahahha... Then I think I will find out how to do that But, can you give me more instruction about attaching my bones to mesh? maybe a function in API Library which I did not notice or a small step by step tutorial, links, anything... Thank you
  12. Yes of course, I edited my topic with a small instruction part Feel free to download my .lua files I will give it a try Thanks for your reply! It is ok I have lived with that 1 weeks anyway, hehe.
  13. Thanks for your reply, nick.ace You said exactly, those bones connection is so elastic. I spent a whole day to find out that too, It seems to be no solution, then I decided to live with this. Created bones by Joint:Ball and Joint:Hinge will be ok if I leave it "free", I mean no picking or interaction after dropping all bones for free falling, set collision type of bones to "Debris". Otherwise, they will be pulled out like hell... All of my ragdoll's bones were created by code (Model:Box()). You mean I need to cut my model's body parts into pieces (sperated legs, arms, hands, head, torso etc) then attach each of them to corresponding bone ?
  14. About gun and camera clipping, I have found a shader named viewport_drawdistance in íts pack from Steam Workshop Here is the link: http://steamcommunity.com/sharedfiles/filedetails/?id=256268930
  15. After 1 week learning LUA Script in Leadweeks, with asistance from our mighty members (macklebee, Josh, Brutile), I have created a test ragdoll and a gun to shoot it. Ragdoll's limbs are dismemberable too. These are videos about my work (this one has a better quality) I feel so excited now. I want to go further... I mean How can I "attach" this ragdoll skeleton to my character Mesh? I used Blender Export Addon for Leadwerks, after that I only got a .mdl file with out any bones in it. I created bones for my character in blender. I noticed that bones are still remain with exported FBX file but I don't know how to use those bones Can anyone give me some suggestions about my question ? Just show me the right way. I will follow hehe. Thank you guys ========================================== (Edited in 160222) ========================================== This part is for members who want to refer my ragdoll code. I know these codes are not perfect and surely need more development. You are free to adjust my code. If you find out any better method to improve it, please reply in this topic. I know I am still new with LUA Script and game programming. Here is the instructions: Create a new Map then a Box for a ground. Create a Pivot, place it right on top of the ground box, name it "Ragdoll spawner" or whatever you like. Attach "RagdollChest.lua" to this Pivot. You can change any parameters of Ragdoll, everything will be auto adjusted to produce a desired ragdoll form in your map's scene. Create a Camera then attach "CustomFPSPlayer.lua" to it, Drag above "Ragdoll spawner" into "Target ragdoll" and choose "fire sound" in Script tab. You should change the default weapon model (around lines 46 - 48) That is all !! Press F5 and have fun. Control: Left Mouse = Shoot Right Mouse = Iron Sight Middle Mouse = Reset Ragdoll ADSW = Movement control X = FreeBone Style1 C = FreeBone Style2 (default for bullet impact on ragdoll) RagdollChest.lua CustomFPSPlayer.lua
  16. Oh I am using entity:Move() if window:KeyDown(Key.W) then body:Move(0,0,0.1) end I will test SetInput() function tonight thanks for your suggestion
  17. Hello, I want to create my own Player in Lua, here is my code for its body body = Model:Box() body:SetShape(Shape:Box()) body:SetMass(20) body:SetCollisionType(Collision.Character) body:SetPhysicsMode(Entity.CharacterPhysics) Then I create a Camera and SetParent(body), add some movement controls (AWDS) too. In debug mode, I use SetDebugPhysicsMode(true) to display physics Compare to Default FPSPlayer, its cylinder physic is so accurate when I move close to an object (Collision.Prop). My character body sometime goes through other objects and its cylinder physic is not accurate. When I release my control key (ex W key), if cylinder physic intersect with an object, my character body will be pushed back a long distance from that object. Can you show me how to make my character body be same as Default FPSPlayer's, to be so accurate
  18. Thanks Brutile, I will give this a try. Hope others give me more idea too
  19. Hello everybody, I have 2 problems with my Gun model. 1. In iron sight mode, the Gun intersects with my player camera. 2. When I move close to the wall, the Gun goes through it Show me the right way to solve please I mean how to avoid these problems
  20. Wow thank you Rick. This works perfectly. You show me all that I need. Hope someday there will be an official function like yours in Leadwerks (Josh?)
  21. I created all objects in Editor and rename them I want to access them from anywhere without using Script.variableName = "" --entity "Label" Example: I press Q key to make an entity disappear ìf window:KeyDown(Key.Q) then GetSomeThingByNameFunction("EntityName"):DoSomeThingFunction() end Just simple like that I need to put this code to main.lua so that I can't use the '--entity' method I guess
  22. This is my Scene Tree If I attach a script to "CSCDSoldier" then I can write something to do to its child (ex: mp5sd) by using self.entity:FindChild("mp5sd"):GetPosition() or in case, script is attached to "mp5sd", I still can get "CSCDSoldier" by using self.entity:GetParent():GetPosition() But how can I get "CSCDSoldier" even "mp5sd" from script which I attached to "Player" I did not find anything like self.entity:GetSiblings("CSCDSoldier"):GetChild("mp5sd") in the API Reference Library Please show me how. Thanks
  23. Yes, everything works fine when I attach an empty script to my "Box2", there is no more error. Thank you
×
×
  • Create New...