FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    Question about HideBone(bone, affect children)

    Scheduled Pinned Locked Moved Modding & Tools
    9 Posts 2 Posters 716 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      Resin_Smoker
      last edited by Resin_Smoker

      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.

      Kykhu Oss https://youtu.be/JUgyGTgeZb8
      Unit Thrower https://youtu.be/iV8YBXVxxeI
      Beam Tentacle https://youtu.be/le5SNwHvC4c
      Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
      Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

      1 Reply Last reply Reply Quote 0
      • C Offline
        CDRMV
        last edited by CDRMV

        @Resin_Smoker
        This is the correct Syntax:

        self:HideBone(Bonename, true)
        self:ShowBone(Bonename, true)
        
        R 1 Reply Last reply Reply Quote 0
        • R Offline
          Resin_Smoker @CDRMV
          last edited by Resin_Smoker

          @cdrmv Sorry i typed it wrong when asking the question.

          Anyways here is a snippet of a new death event I'm working on...

          https://youtu.be/BKs87jW7PEs

          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.

          Kykhu Oss https://youtu.be/JUgyGTgeZb8
          Unit Thrower https://youtu.be/iV8YBXVxxeI
          Beam Tentacle https://youtu.be/le5SNwHvC4c
          Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
          Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            CDRMV @Resin_Smoker
            last edited by

            @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.

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              Resin_Smoker @CDRMV
              last edited by

              @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...

              Kykhu Oss https://youtu.be/JUgyGTgeZb8
              Unit Thrower https://youtu.be/iV8YBXVxxeI
              Beam Tentacle https://youtu.be/le5SNwHvC4c
              Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
              Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                CDRMV @Resin_Smoker
                last edited by

                @resin_smoker
                Impressive most Impressive 😉

                1 Reply Last reply Reply Quote 0
                • R Offline
                  Resin_Smoker
                  last edited by

                  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.

                  Kykhu Oss https://youtu.be/JUgyGTgeZb8
                  Unit Thrower https://youtu.be/iV8YBXVxxeI
                  Beam Tentacle https://youtu.be/le5SNwHvC4c
                  Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                  Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    Resin_Smoker
                    last edited by

                    Here's a video of my current progress with the new death event: https://youtu.be/6gDMp9Twc7o

                    Kykhu Oss https://youtu.be/JUgyGTgeZb8
                    Unit Thrower https://youtu.be/iV8YBXVxxeI
                    Beam Tentacle https://youtu.be/le5SNwHvC4c
                    Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                    Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      Resin_Smoker @Resin_Smoker
                      last edited by

                      Uploaded the files to the Client for those that would like to see how it works.
                      f8cf0d3d-b6c6-4d18-9da4-0a4a7ee0e877-image.png

                      Kykhu Oss https://youtu.be/JUgyGTgeZb8
                      Unit Thrower https://youtu.be/iV8YBXVxxeI
                      Beam Tentacle https://youtu.be/le5SNwHvC4c
                      Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                      Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post