Question about HideBone(bone, affect children)
-
Does anyone know if the following command HideBone(bone, affectChildren), works on projectiles that have meshs?
SetMesh() and SetScale() does and both use the projectiles "self"...
Been attempting to run...
if self.ParentMesh then self:SetMesh(self.ParentMesh, true) self:SetScale(self.ParentScale) HideBone(self, 0, true) ShowBone(self, self.Bone, false) end
Which works great (new mesh shows), until I attempt to hide the unwanted bones. Producing the following lua error...
access to nonexistent global variable HideBone
Note: The self.ParentMesh is the firing units mesh being saved for use by the projectile. Furthermore, I can run self:GetBoneCount() without issue. Hence I know the bones are valid.
Edit: Corrected original post.
-
@Resin_Smoker
This is the correct Syntax:self:HideBone(Bonename, true) self:ShowBone(Bonename, true)
-
@cdrmv Sorry i typed it wrong when asking the question.
Anyways here is a snippet of a new death event I'm working on...
Notice that the projectiles created from the bones take the original units mesh and bounce a few time before dying. What I'm not able to do is hide the unwanted the bones, to make projectiles match the unit bones it spawned from.
Anyways, It doesn't appear that Hiding a mesh "bone" on a projectable is viable as HideBone() is a unit side function only.
What i may end up doing instead, is spawning a dummy unit onto the projectile and setting up the mesh for that. Which that is somewhat overly convoluted, but I can't think of a better way of doing what's needed given the current projectile limitations.
-
@resin_smoker
Looks Interesting and looking forward for the Finished Version of it. I have created an different Death Sequence for my Cybran Worms, where each Section explode one after the other. -
@cdrmv I did something like this but realized (very likely) that no one has ever thrown the unit bones around as part of the death event. Right now I'm very close to succeeding...
-
@resin_smoker
Impressive most Impressive -
Dam, keep getting a stack overflow from the dummy unit. Will Just copy a standard unit (wall) and convert it to be sure I'm not missing something needed.
-
Here's a video of my current progress with the new death event: https://youtu.be/6gDMp9Twc7o
-
Uploaded the files to the Client for those that would like to see how it works.