Page 1 of 1

Need help with bonding to human

Posted: Sat Feb 17, 2024 3:37 pm
by SansSR
I'm trying to make a plugin that binds a rope to the players pelvis but im not sure if it's even possible. Was wondering if anyone could help me. :oops:

Code: Select all

---@type Plugin
local plugin = ...
plugin.name = 'BBC'
plugin.author = 'xX_GakMaster_Xx'
plugin.description = 'gives you a BBC'


plugin.commands["/bbc"] = {
	info = "gives you a BBC",
	canCall = function(ply) return ply.isadmin end,
	call = function(ply, man, args)
		assert(man, "Not spawned in.")
		local itm = items.create(itemTypes[36], man.pos, orientations.s)
		local crotch = man:getRigidBody(00)
		local a = {1, 1, 1}
		local b = {1, 1, 1}
		if itm then
			ItemType:setCanMountTo(man, true)
			RigidBody:bondTo(crotch, a, b)
			end
	end
	}
	

Re: Need help with bonding to human

Posted: Thu Jul 11, 2024 10:03 pm
by Dingus
https://github.com/QSavvy/Goat-Game-Pub ... n/hang.lua

Just comment out the line

Code: Select all

rope.rigidBody:bondToLevel(Vector(0, 0, 0), Vector(victimMan.pos.x, victimMan.pos.y + 10, victimMan.pos.z))
and remove the + 10 from this line

Code: Select all

items.create(itemTypes[36], Vector(victimMan.pos.x, victimMan.pos.y + 10, victimMan.pos.z), orientations.n)