So i'm trying to add a horse mask to my server and I can't seem to figure out how to use these
[url]https://wiki.garrysmod.com/page/Entity/SetParent[/url]
[url]https://wiki.garrysmod.com/page/Entity/GetPos[/url]
[url]https://wiki.garrysmod.com/page/Entity/SetParent[/url]
Not saying I need someone to code the entire thing for me but I need a nudge in the right direction.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetParent]Entity:SetParent[/url]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/LookupAttachment]Entity:LookupAttachment[/url]
The attachment name is "eyes." Parent your model to the player using the "eyes" attachment ID, and it'll function as you'd expect. You'll need to follow up using
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetMoveType]Entity:SetMoveType[/url]
Everything you need is in the wiki.
Use this function to make the entity follow the player.
ent:FollowBone( LocalPlayer(), 1 )
[url]https://wiki.garrysmod.com/page/Entity/FollowBone[/url]
[QUOTE=Winter;51286408]Use this function to make the entity follow the player.
ent:FollowBone( LocalPlayer(), 1 )
[url]https://wiki.garrysmod.com/page/Entity/FollowBone[/url][/QUOTE]
Consider using ent:LookupBone to find the proper BoneID rather than hardcoding it.
Sorry, you need to Log In to post a reply to this thread.