hi.
is there a function that return name of bone that i clicked on?
I want do it without select that bone
clicked bone name
Moderators: Víctor Paredes, Belgarath, slowtiger
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
clicked bone name
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Re: clicked bone name
Make sure you’ve got the skeleton and mouseVector and use:
Edit: Wait NearestBone probably returns the bone ID and not the actual bone, if so, use that to get the bone and then get the name.
Code: Select all
skeleton:NearestBone(mouseVector):Name()
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: clicked bone name
thanks lukas.Lukas wrote: ↑Sat Aug 28, 2021 6:23 pm Make sure you’ve got the skeleton and mouseVector and use:Edit: Wait NearestBone probably returns the bone ID and not the actual bone, if so, use that to get the bone and then get the name.Code: Select all
skeleton:NearestBone(mouseVector):Name()
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
- synthsin75
- Posts: 10009
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: clicked bone name
Yeah, like Lukas corrected in his edit, it would be:
skeleton:Bone(skeleton:NearestBone(mouseVector)):Name()
You could even get this without clicking, in OnMouseMoved, using:
pfx_ScriptName:NonDragMouseMove()
skeleton:Bone(skeleton:NearestBone(mouseVector)):Name()
You could even get this without clicking, in OnMouseMoved, using:
pfx_ScriptName:NonDragMouseMove()
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- davoodice2
- Posts: 381
- Joined: Tue Jun 15, 2021 1:14 pm
Re: clicked bone name
thanks you synthsin75synthsin75 wrote: ↑Sat Aug 28, 2021 9:39 pm Yeah, like Lukas corrected in his edit, it would be:
skeleton:Bone(skeleton:NearestBone(mouseVector)):Name()
You could even get this without clicking, in OnMouseMoved, using:
pfx_ScriptName:NonDragMouseMove()
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش