Page 1 of 1

gravinpc.lua(GNPC)- holding an item alters your gravity!

Posted: Sat Sep 30, 2023 5:56 pm
by MarioChallengerX2
https://imgur.com/a/ncQAgkf

Another SMW custom mechanic. It's used in JUMP, JUMP 1/2 and potentially YUMP 2.

Essentially, what it originally does is that when holding a block, it makes you jump much higher. However, this library messes with the player's gravity instead(because i didn't notice Defines.jumpheight lol) 

Anyway, what you can do with the library:
  • gnpc.gravitytable {} -- A lookup table that lets you register an NPC to alter Mario's gravity.
Example:

Code: Select all

gnpc.gravitytable[45] = true -- can be set to false if you want to disable specific npcs.
  • gnpc.activation -- a boolean to enable the script at will. True by default


gnpc.gravitable -- A table of values that set Defines.gravity and Defines.player_grav respectively. This value applies upon grabbing an item.

gnpc.gravitabledefault -- Same concept but uses the default values for the settings above. (As in, when you start the level) This value applies upon letting go of an item.

And that's all you need to know about the script! Hopefully you have fun using this!

Download link:
https://drive.google.com/file/d/1RN3A4B ... sp=sharing


























also yes, this is a joke on pnpc