Search found 209 matches
- Fri Oct 05, 2018 9:00 pm
- Forum: Modding help
- Topic: Create a function that will work for 10 ticks when it is called.
- Replies: 5
- Views: 1632
Re: Create a function that will work for 10 ticks when it is called.
function print_message_within_10_tick() if game.tick <= goal then game.print(game.tick) else script.on_event(defines.events.on_tick, nil) -- delete listener end end goal = game.tick + 10 script.on_event(defines.events.on_tick, print_message_within_10_tick) -- add listener Wow, great work! Thanks fo...
- Fri Oct 05, 2018 8:37 pm
- Forum: Modding help
- Topic: Create a function that will work for 10 ticks when it is called.
- Replies: 5
- Views: 1632
Create a function that will work for 10 ticks when it is called.
What are the ways to implement a function that will work for 10 ticks when it is called?
For example, I create a function that I call using the console.
How do I make this function work for 10 ticks?
For example, I create a function that I call using the console.
Code: Select all
function print_message_within_10_tick()
game.print(game.tick)
end
- Fri Oct 05, 2018 8:06 pm
- Forum: Modding help
- Topic: [Solved] player index got nil in event on_marked_for_deconstruction
- Replies: 8
- Views: 1991
Re: player index got nil in event on_marked_for_deconstruction
The problem was that coal falling out of the rock was automatically marked by deconstruction. And the owner of the marker was not a player.
- Tue Oct 02, 2018 10:10 am
- Forum: Resolved Problems and Bugs
- Topic: [0.16.51] Crash when creating deconstructible-tile-proxy
- Replies: 1
- Views: 706
[0.16.51] Crash when creating deconstructible-tile-proxy
I use this command and get crash:
This does not happen in freeplay, but appears in some scenarios. for example team-production.
Code: Select all
/c game.player.surface.create_entity{name="deconstructible-tile-proxy", position={0,0}}
- Mon Oct 01, 2018 6:02 pm
- Forum: Modding help
- Topic: [Solved] player index got nil in event on_marked_for_deconstruction
- Replies: 8
- Views: 1991
Re: player index got nil in event on_marked_for_deconstruction
on_marked_for_deconstruction Called when an entity is marked for deconstruction with the Deconstruction planner or via script. Contains entity :: LuaEntity player_index :: uint (optional) The doc clearly states that player_index is optional. So you need to check if it actually exists. I have no ide...
- Mon Oct 01, 2018 5:10 pm
- Forum: Modding help
- Topic: [Solved] player index got nil in event on_marked_for_deconstruction
- Replies: 8
- Views: 1991
[Solved] player index got nil in event on_marked_for_deconstruction
Hi, I wrote a script to remove the deconstruction markers if the player has played less than 4 hours on my server. function not_deconstruct(event) local player = game.players[event.player_index] if player.online_time > 60*60*60*4 then return end player.clean_cursor() event.entity.cancel_deconstructi...
- Thu Sep 20, 2018 10:03 pm
- Forum: Modding help
- Topic: Is it possible to deactivate player-port?
- Replies: 2
- Views: 983
Is it possible to deactivate player-port?
Hi! I want to use the player-port for my purposes, but I'm really hampered by the fact that he is respawned my player. Is it possible to somehow disable this function using scripting and use the port as a ordinary object? I tried entity.active choose false. But it did not work. Transferring an playe...
- Mon Sep 10, 2018 12:32 pm
- Forum: Modding help
- Topic: I can not register an event
- Replies: 3
- Views: 1758
I can not register an event
I created a file in which I wrote a script that I had to run in the event.on_player_created. In the control.lua I also already have this event. But I do not want to move this function from mid.lua to control.lua. control.lua: require "mid" script.on_event(defines.events.on_player_created, ...
- Sun Aug 19, 2018 6:41 am
- Forum: News
- Topic: Friday Facts #256 - The little things 3
- Replies: 111
- Views: 47124
Re: Friday Facts #256 - The little things 3
infinity chestrcbrito91 wrote:Does anyone know what is the pink icon on the edge of dropped item square?
- Sat Aug 11, 2018 10:33 am
- Forum: Modding help
- Topic: [Solved]Can not delete unused chunks
- Replies: 3
- Views: 1172
Re: Can not delete unused chunks
Thanks for the help, Bilka!
- Sat Aug 11, 2018 10:15 am
- Forum: Modding help
- Topic: [Solved]Can not delete unused chunks
- Replies: 3
- Views: 1172
[Solved]Can not delete unused chunks
Hi, i wrote this code, which should delete all the chunks except those on which there are player builds.But instead, he removes the chunks on the contrary with the players buildings. Why? function delete_chunks() local surface = game.surfaces.nauvis for chunk in surface.get_chunks() do local entitie...
- Fri Aug 10, 2018 4:36 pm
- Forum: News
- Topic: Friday Facts #255 - Construction tools
- Replies: 140
- Views: 52214
Re: Friday Facts #255 - Construction tools
How about a capsule with temporary construction robots for an early game?
- Fri Aug 03, 2018 2:26 pm
- Forum: News
- Topic: Friday Facts #254 - No research queue for you
- Replies: 223
- Views: 82477
Re: Friday Facts #254 - No research queue for you
No research queue? Oh no, oh no, oh no no no no no!
- Mon Jul 30, 2018 4:00 pm
- Forum: Ideas and Suggestions
- Topic: Double-slider for personal logistic requests/trashing
- Replies: 8
- Views: 3278
Re: Double-slider for personal logistic requests/trashing
Devs, can we see this function in the new inventory improvements?
- Sun Jul 29, 2018 11:06 pm
- Forum: General discussion
- Topic: Best Factorio feature
- Replies: 15
- Views: 5180
Re: Best Factorio feature
The use of sulfur for uranium mining.This way of resource extraction looks interesting.
- Fri Jul 27, 2018 8:36 pm
- Forum: News
- Topic: Friday Facts #253 - Fans & Fun
- Replies: 74
- Views: 32151
Re: Friday Facts #253 - Fans & Fun
Can we count on the installation of the gate on the diagonal rails?
- Sun Jul 08, 2018 9:13 pm
- Forum: News
- Topic: Friday Facts #250 - Dead end conclusion
- Replies: 142
- Views: 55304
Re: Friday Facts #250 - Dead end conclusion
I couldn't stand the hand drawn mockup I had on my longer post. Here's a better one. Also, I'd like to suggest while you're making changes to the BP system that you can manually change the insert point of a blueprint. For instance, say that 5x5 array is 25 of the Solar Array w/ Roboport. Without us...
- Fri Jun 15, 2018 4:03 pm
- Forum: Releases
- Topic: Version 0.16.51
- Replies: 121
- Views: 95344
Re: Version 0.16.51
The best improvement!
- Sat May 19, 2018 11:35 am
- Forum: Resolved Problems and Bugs
- Topic: [kovarex] [0.16.43] Crash when load save version 0.13.13
- Replies: 2
- Views: 1349
[kovarex] [0.16.43] Crash when load save version 0.13.13
When I load the old save, I get crash
Mods were not used
Mods were not used
- Thu Apr 19, 2018 3:13 pm
- Forum: Resolved Problems and Bugs
- Topic: [wheybags] [0.16.36] Crash when rocket launch
- Replies: 2
- Views: 2252