How to change forcefield strength?

Discussion in 'Programming' started by mrwallace888, Feb 19, 2025.

  1. mrwallace888

    mrwallace888
    Expand Collapse

    Joined:
    Jun 17, 2015
    Messages:
    534
    I came across this video testing the limits of the forcefield feature (which is really fun to mess with haha), and in the video he changed a value to increase its strength, but I don't know what file the value is in, as he doesn't show it, only the small snippet of code he was changing that was cropped in view.

    Where can I find this value?
     
  2. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    218
    The force field code is located in lua/ge/extensions/gameplay/forceField.lua
    The values you can see in the video are at the top of the file.

    You can also change the force field strength by executing the following code in the console:
    Code:
    gameplay_forceField.setForceMultiplier(value)
    gameplay_forceField.activate()
    Instead of value, input a number. Positive values push objects away from you, negative values pull objects toward you.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice