I’ve recently been working on a money, heat and etc calculator for my game. Except, when I place a solar panel next to a generator, it starts making money, but when I bring an item or unit close, my money turns to NaN and thus, the engine doesn’t change it, even after keeping distance from the units.
Game link: http://www.modd.io/play/B3hfs2vbL
Even tho I tried to prevent this, the math still gives out a NaN. (Notice: “owner of selected unit” is an entity variable)
try this : create a script without trigger called “points for admin” after youput this script : set poits of player or unit of last casting unit as point of last casting unit or player + 10000 and then create a bility and finally you put this ability in a unit