#(Fly mod) Handling args in statusEffect

2 messages · Page 1 of 1 (latest)

lofty flame
#

Hello!
I'm working on a mod in which I would like to implement a fly feature on an item. For example if I wear some specific boots I would like the character to be able to fly 🪽.

(i.e when pressing and holding jump the character should go up, no more no less)

I took some inspiration from Silver Sokolova's HermesBoots mod but the mod is using Techs and I would like mine to use statusEffect instead (cause statusEffect are tied to items and techs are not).

I linked my Lua script and the statusEffect code to this post but when running the game and equipping items I end up with the following error in the game logs:
[19:51:43.962] [Error] Exception while invoking lua function 'update'. (LuaException) Error code 2, [string "/stats/effects/kamen_fly/kamen_fly.lua"]:8: attempt to index a number value (local 'args')

I am doing something wrong? (I'm completely new to Lua scripting)
Maybe it isn't possible to intercept player movements or keystrokes from status scripts..

spring river
#

status effects do not have access to player inputs