COMMUNITY FORUM

Enable object ollision

Forum Overview >> Scripting

CategoryScripting
Created14.11.2024 18:20


Pavel Chodura (ThunderJetCZ) 14.11.2024 18:20
Hi, Im attempting to make a mod that re-enables collision on objects that are currently picked up by the player, Im not sure what event I should hook the functionality to.

my rough outline looks like this (though I dont know if some of these functions even exist:




function Player:pickUpObject(state, noEventSend)
pickUpObject(self, state, noEventSend)

if self.lastFoundObject then
print("found valid object")
if state then
print("Object picked up: Enabling collision.")
toggleObjectCollision(self.lastFoundObject, true)
else

end
else
print("Error: lastFoundObject is nil.")
end
end

So if anyone could point me in the right direction, I'd appreciate it


Note: Log in to post. Create a new account here.