You should be able to do that actually:Isocitration wrote:Just an update on this, I was able to come up with a solution that should work, in theory. Basically checking the player's status to see if Yoshi is currently being ridden. If on Yoshi, set the relevant npc to be grabbable.
Problem is that there doesn't seem to be an npc offset for grabbability listed on the wiki, which I find somewhat surprising since many other properties that can be changed via npc code are on there. So I guess it's unknown then? That's kind of a bummer.
Take a look at npcconfig.lua by Hoeloe (file)
Grabbability is something that's per NPC-type rather than per individual NPC. The per NPC-type parameters aren't particularly well documented currently outside of npcconfig.lua existing. To do it without npcconfig.lua dependency if you prefer is just a couple lines too, and would look like:
Code: Select all
local PTR_NPC_GRABSIDE = mem(0x00B25E2C, FIELD_DWORD)
mem(PTR_NPC_GRABSIDE + npcid * 2, FIELD_WORD, -1)