Page 1 of 1

EvoGUI - Trying to update

Posted: Thu Apr 27, 2017 8:45 pm
by Chamkey
Can't get this to work.

Code: Select all

local evo_factor = force.evolution_factor
In-game it tells me "attempt to index global 'force' (a nil value)"

Please help. I'm going to be uploading it to the mod portal asap. I know a lot of people who want this on my friends list.

Re: EvoGUI - Trying to update

Posted: Fri Apr 28, 2017 12:22 am
by Nexela
How are you getting "force"

Everything from the game requires getting it from the game. global (unless sent through an event ie. gui events send the element)

local force = game.forces["name-of-force"]

Re: EvoGUI - Trying to update

Posted: Fri Apr 28, 2017 4:34 am
by Chamkey
Nexela wrote:How are you getting "force"

Everything from the game requires getting it from the game.global (unless sent through an event ie. gui events send the element)

local force = game.forces["name-of-force"]
Thank you... I didn't understand what a force was in the context of this game. I thought it was something that had to do with actual science push, pull, friction. That sorta thing. Went it to the Command Console to find out that that is not the case. Finally got it working.. will be up on the mod portal in a few.