Every time i edit my map, i have to rename my control.lua or it will screw up literally everything.
for me, this is not a too big deal - but if the end-user wants to change something, he/she won't be able to.
on the on_player_joined event and the on_player_created event, the player still has a character and is controller_type 1.
the editor's gui is not detectable either.
How to check if game is running in editor?
How to check if game is running in editor?
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
Re: How to check if game is running in editor?
Just check if the player is using the editor controller in your events. Or use https://lua-api.factorio.com/latest/eve ... map_editor.
I'm curious though, how do things get screwed up?
I'm curious though, how do things get screwed up?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: How to check if game is running in editor?
cause the script is placing and replacing lots of stuff on init^^
i fixed it now by delaying the player controller check by 1 tick and only then triggering the init...
i fixed it now by delaying the player controller check by 1 tick and only then triggering the init...
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
Re: How to check if game is running in editor?
That's... not how you make mods in Factorio.
If your mod is written correctly it will never care about the map editor being a thing. You can also run the game tick forward while editing through the map editor so you didn't actually fix anything.
If you want to get ahold of me I'm almost always on Discord.
Re: How to check if game is running in editor?
huh?
i created alternative versions of the trees afterwards, with a bigger collision box (cause the creep's pathfinding is still suboptimal)
also i was too lazy to place the base's walls in a perfect circle, so i did that with tiles^^
Guess thats still fixable but it also puts a gui into every player's face ... and i have so many global variables and i don't even know how much other stuff that checking for editor status was the simplest solution...
https://mods.factorio.com/mod/dota ^^
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance