Garry's Mod

Garry's Mod

Not enough ratings
BoneCore2 (Expression 2 Extension)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun
File Size
Posted
Updated
22.272 KB
16 May, 2022 @ 6:15pm
26 Nov, 2024 @ 3:57pm
7 Change Notes ( view )

Subscribe to download
BoneCore2 (Expression 2 Extension)

In 1 collection by [FC&N] Magnum MacKivler
FC&N Addon Pack (Official)
238 items
Description
MAKE SURE TO ENABLE THE EXTENSION PRIOR TO USE. The following console command will enable BoneCore2 on your server:
wire_expression2_extension_enable bonecore2
ALSO IMPORTANT, MAKE SURE BONE MANIPULATION IS ENABLED ON THE SERVER. The following console command should be placed into the server's cfg/server.cfg file:
sbox_bonemanip_misc 1




Bonecore 2
Sadly, not a genre of music with lots of xylophones as the name would suggest. BoneCore2 is an extension for Wiremod's Expression 2 that adds bone manipulation functions.

This addon is meant to improve upon the original Bone Core made by Void, using a slightly more reliable method and adding more functions for getting and setting bone manipulations. The addons are NOT meant to be used together. The addon is not compatible with gmod's vanilla bone manipulation property for reasons of efficiency[wiki.facepunch.com].

The Functions
BoneCore2 features a full library of functions which can change a bone's position, angle, scale, and jiggliness. Position, angle, and scale are interpolated, meaning they will change quickly but smoothly.

Name & Index
E:boneIndex(S)
Returns the numeric index associated with E's bone (named S), or -1 if invalid.
E:boneName(N)
Returns the name associated with E's bone (index N) or an empty string if invalid.

Position
E:setBonePos(N, V)
Sets the position of E's bone (index N) local to E.
E:setBonePosRelative(N, V)
Sets the position of E's bone (index N) relative to the default position. Setting the value to (0,0,0) moves the bone to its default position.
E:getBonePos(N)
Returns the position of E's bone (index N) local to E.

Angles
E:setBoneAng(N, A)
Sets the angles of E's bone (index N) local to E.
E:setBoneAngRelative(N, A)
Sets the angles of E's bone (index N) relative to the default position. Setting the value to (0,0,0) moves the bone to its default position.
E:getBoneAng(N)
Returns the angles of E's bone (index N) local to E.

Scale
E:setBoneScale(N, V)
Sets the scale of E's bone (index N). Default scale is vec(1,1,1).
E:getBoneScale(N)
Returns the scale of E's bone (index N).

Jiggle
E:setBoneJiggle(N, N)
Sets E2's bone (index N) to be jiggly (1) or rigid (0).
E:getBoneJiggle(N)
Returns whether E's bone (index N) is jiggly (1) or rigid (0).


3 Comments
starwarsfan123 10 Feb, 2024 @ 9:13am 
im confused bc idk how to index a bone in gmod
america's golden shower era 28 Jun, 2023 @ 11:28am 
Update has fixed this
america's golden shower era 5 Apr, 2023 @ 6:16am 
Previously this would fail on line 47. New error: sv: Expression 2 (RepLC v0.0.5 control stand - GP7/GP9/GP16/GP20): entities/gmod_wire_expression2/core/custom/bonecore2.lua:199: attempt to index local 'this' (a nil value)

Here is the E2 code, happens when it is spawned using advanced dupe: https://github.com/tylar-np/gmod-tylars-e2-pack/blob/master/expression2/tylars-pack/replc/stands/005/replc_stand_anyone_gp7_9_16_20.txt