I was wondering what role the engine's/mods' constants and variables play. Are they only readable or is it possible to change the value?
I tryied changing the Game.Gravity to 0.1 in a gadget and it seems like it changed although in the game I didn't see any visual difference..
Possible to change values of Spring/Mod globals?
Moderator: Moderators
Re: Possible to change values of Spring/Mod globals?
according to wiki Game.gravity is a constant, so you can not change it.
i am pretty sure units & projectiles have a mygravity or something you could try changing that.
i am pretty sure units & projectiles have a mygravity or something you could try changing that.
Re: Possible to change values of Spring/Mod globals?
If you change the values of all those constant in Lua, they will be changed for when other Lua gadgets read them, but not for the C++ simulation.
At the start of the game, all those constant are copied into Lua variables. The Lua copy is read/write, because there is no read-only in the Lua language. However, they are not meant to be overwritten, and overwritting them will achieve nothing except you losing the ability to know the original value.
At the start of the game, all those constant are copied into Lua variables. The Lua copy is read/write, because there is no read-only in the Lua language. However, they are not meant to be overwritten, and overwritting them will achieve nothing except you losing the ability to know the original value.
Re: Possible to change values of Spring/Mod globals?
not true but otherwise yeszwzsg wrote:no read-only in the Lua language