• Entity:SetBonePosition() function....What's it do?
    5 replies, posted
I see it's a client side function but what does it do exactly..? [url]http://wiki.garrysmod.com/?title=Entity.SetBonePosition[/url] The example says this will move a ents bones all over the place on your screen [lua]function StuffUpEveryBone( entity ) for i = 1, 128 do --An entity cannot have more than 128 bones entity:SetBonePosition( i, VectorRand() * 32, VectorRand():Angle() ) end end[/lua] How...? I tried to use this function in a client side script, my garrysmod froze...... I tried to re-open garrysmod and my computer bluescreened. My year old 1500 line script gone.... I found an old version and managed to rewrite it since I knew a lot of the functions... but anyways. What does SetBonePosition Do....? By the sound of the example, it sounds like it can be used to make the entitys bones be right in front of your crosshair, sort of like an OPK hack where you can just shoot anywhere, and set their headbone in front of you..... Anyone have info on this function?
Take a look at this. It uses this idea. [url]http://www.facepunch.com/showthread.php?t=821202[/url]
[QUOTE=JetBoom;18481100]Take a look at this. It uses this idea. [url]http://www.facepunch.com/showthread.php?t=821202[/url][/QUOTE] Yah I got it to work on ragdolls.. but it says it also works on NPCs and players... and It doesn't do anything.
You need to look at the BuildBonePositions function.
[QUOTE=JetBoom;18481336]You need to look at the BuildBonePositions function.[/QUOTE] I cant find any such function on the function search or the wiki [url]http://luasearch.overvprojects.nl/index.php?searchtext=BuildBone[/url] I found this on a tut page on the wiki.. function ENT:BuildBonePositions( NumBones, NumPhysBones ) // You can use this section to position the bones of // any animated model using self:SetBonePosition( BoneNum, Pos, Angle ) // This will override any animation data and isn't meant as a // replacement for animations. We're using this to position the limbs // of ragdolls. end But it doesn't tell much... server or client sided.... do animated models == npcs?
[QUOTE=Xtensity;18482454] But it doesn't tell much... server or client sided.... do animated models == npcs?[/QUOTE] Client side and yes.
Sorry, you need to Log In to post a reply to this thread.