I have a GUI that I want to open with the Radars.
When I try to open the radar GUI, the on_gui_opened event is not triggered.
script.on_event({
defines.events.on_gui_opened
}, function(event)
game.players[event.player_index].print("Event: Actived")
end)
What am I doing wrong?
How do I fix ...
Search found 147 matches
- Mon Jul 28, 2025 3:08 am
- Forum: Modding help
- Topic: How do I open a GUI with the radar?
- Replies: 5
- Views: 777
- Sun Jul 27, 2025 3:53 pm
- Forum: Modding help
- Topic: [Solved] How do I change the sound of a dropdown menu?
- Replies: 6
- Views: 795
- Sat Jul 26, 2025 8:32 pm
- Forum: Modding help
- Topic: [Solved] How do I change the sound of a dropdown menu?
- Replies: 6
- Views: 795
Re: How do I change the sound of a dropdown menu?
Seeing your response, it's possible that I didn't explain myself correctly.
I want to change the sound when selecting one of the options displayed.
I am already changing the style of the dropdown.
But, I still appreciate your response.
The following is the last code I tried, but it doesn ...
- Fri Jul 25, 2025 11:17 pm
- Forum: Modding help
- Topic: [2.0.60] Event "on_player_placed_equipment" Firing Twice
- Replies: 2
- Views: 578
Re: [2.0.60] Event "on_player_placed_equipment" Firing Twice
I tested your code and you're right.
Perhaps you should use another event.
on_equipment_inserted
Try it and let me know if it works for you. I'll be waiting to hear from you.
Perhaps you should use another event.
Code: Select all
defines.events.on_equipment_inserted
Try it and let me know if it works for you. I'll be waiting to hear from you.
- Fri Jul 25, 2025 11:27 am
- Forum: Modding help
- Topic: [Solved] How do I change the sound of a dropdown menu?
- Replies: 6
- Views: 795
[Solved] How do I change the sound of a dropdown menu?
Hello, I am creating an interface and would like to customize the selection sound.
(10).png
I created the custom dropdown style.
Styles["zzzYAIM0425_0900_drop_down_channels"] = {
type = "dropdown_style",
width = 282 + 32
}
(11).png
When the options are displayed, each option has a ...
(10).png
I created the custom dropdown style.
Styles["zzzYAIM0425_0900_drop_down_channels"] = {
type = "dropdown_style",
width = 282 + 32
}
(11).png
When the options are displayed, each option has a ...
- Thu Jul 24, 2025 9:06 pm
- Forum: Modding help
- Topic: [Solved] How do I upload a sound to use when pressing a button?
- Replies: 2
- Views: 430
Re: How do I upload a sound to use when pressing a button?
My solution
---> data-final-fixes.lua <---
data:extend({{
type = "sound",
name = "gui_tool_button",
filename = "__core__/sound/gui-tool-button.ogg"
}})
---> control.lua <---
Player.play_sound({ path = "gui_tool_button" })
Thanks for the message.
The truth is that I solved it on my own ...
---> data-final-fixes.lua <---
data:extend({{
type = "sound",
name = "gui_tool_button",
filename = "__core__/sound/gui-tool-button.ogg"
}})
---> control.lua <---
Player.play_sound({ path = "gui_tool_button" })
Thanks for the message.
The truth is that I solved it on my own ...
- Wed Jul 23, 2025 12:02 pm
- Forum: Modding help
- Topic: [Solved] How do I upload a sound to use when pressing a button?
- Replies: 2
- Views: 430
[Solved] How do I upload a sound to use when pressing a button?
Hello, today I wanted to use a sound that comes with Factorio, but it is not available for use in mods. So I am trying to load it myself and then call it.
It is not working for me.
Help
The following is the code I am using.
---> data-final-fixes.lua <---
data.raw["utility-sounds"]["default ...
It is not working for me.
Help
The following is the code I am using.
---> data-final-fixes.lua <---
data.raw["utility-sounds"]["default ...
- Tue Jun 10, 2025 2:56 am
- Forum: Modding help
- Topic: [Solved] What will happen to entities when merging two forces?
- Replies: 5
- Views: 765
Re: What will happen to entities when merging two forces?
Now I understand, thanks for the clarification.
Out of curiosity, at what point do the forces combine? I can't imagine a scenario where two forces merge.- Tue Jun 10, 2025 2:30 am
- Forum: Modding help
- Topic: [Solved] What will happen to entities when merging two forces?
- Replies: 5
- Views: 765
Re: What will happen to entities when merging two forces?
Thanks for the answer
I think the message got lost in translation.The entities will be destroyed?
I have to change the force on the entities?
Please be more detailed, I don't know much about the force.
- Tue Jun 10, 2025 1:19 am
- Forum: Modding help
- Topic: [Solved] What will happen to entities when merging two forces?
- Replies: 5
- Views: 765
[Solved] What will happen to entities when merging two forces?
I want to program the event on_forces_merged, but I don't know what happens with the entities in forces to be eliminated, are they destroyed? are they kept and the force is changed? or what happens?
I know it's a simple question, but I don't know of an event that merges forces for testing.
I know it's a simple question, but I don't know of an event that merges forces for testing.
- Mon Jun 09, 2025 6:13 pm
- Forum: Modding help
- Topic: [Solved] How to disconnect the radar from the signal network?
- Replies: 2
- Views: 583
- Mon Jun 09, 2025 12:09 pm
- Forum: Modding help
- Topic: [Solved] How to disconnect the radar from the signal network?
- Replies: 2
- Views: 583
[Solved] How to disconnect the radar from the signal network?
I need help
Hello, I hope you are doing well.
I want to create a radar but I don't want it to communicate with other radars.
Context
When I create three radars on a surface and send a signal through one of the radars, the others receive that signal, which is normal.
Here is the case described ...
Hello, I hope you are doing well.
I want to create a radar but I don't want it to communicate with other radars.
Context
When I create three radars on a surface and send a signal through one of the radars, the others receive that signal, which is normal.
Here is the case described ...
- Mon May 19, 2025 11:55 pm
- Forum: Modding help
- Topic: GUI update (Help me, Please)
- Replies: 5
- Views: 1127
Re: GUI update (Help me, Please)
I have advanced in the GUI.
I found no way to access the flows mentioned in the post.
The GUI is as follows:
Captura de pantalla (409).png
What code should i use to copy the selected text into the image?
Captura de pantalla (410).png
This is the closest thing i found about copying ...
I found no way to access the flows mentioned in the post.
The GUI is as follows:
Captura de pantalla (409).png
What code should i use to copy the selected text into the image?
Captura de pantalla (410).png
This is the closest thing i found about copying ...
- Sat May 17, 2025 12:54 am
- Forum: Modding help
- Topic: cannot read recipe subgroup from data.raw
- Replies: 8
- Views: 1652
Re: cannot read recipe subgroup from data.raw
I don't see any error in your code, I think you are missing information.
I suggest changing this line
new_recipe.localised_name=recipe.name
To the following line, if you want to assign a name to the object depending on the language and not just the name of the object.
new_recipe ...
- Tue May 13, 2025 1:42 am
- Forum: Modding help
- Topic: GUI update (Help me, Please)
- Replies: 5
- Views: 1127
Re: GUI update (Help me, Please)
This may help me, thank you very much.
- Sun May 11, 2025 3:31 pm
- Forum: Modding help
- Topic: GUI update (Help me, Please)
- Replies: 5
- Views: 1127
Re: GUI update (Help me, Please)
Now I have another question
Before I used to use this line to close the menu when using Esc, E or opening another menu; but now it is not working.
player.opened = main_frame
Can you tell me
What I am doing wrong?
The following code is functional
---> control.lua <---
script.on_event(defines ...
Before I used to use this line to close the menu when using Esc, E or opening another menu; but now it is not working.
player.opened = main_frame
Can you tell me
What I am doing wrong?
The following code is functional
---> control.lua <---
script.on_event(defines ...
- Sat May 03, 2025 12:34 am
- Forum: Modding help
- Topic: GUI update (Help me, Please)
- Replies: 5
- Views: 1127
Re: [2.0.43] GUI update (Help me, Please)
I have created a Frame as the main container
But I don't know how to add the buttons in the title bar.
In the images you can see that there are two children
How can I select a children from an element ...
But I don't know how to add the buttons in the title bar.
In the images you can see that there are two children
How can I select a children from an element ...
- Fri May 02, 2025 9:08 pm
- Forum: Gameplay Help
- Topic: How to deactivate the Flat character GUI
- Replies: 2
- Views: 615
Re: How to deactivate the Flat character GUI
What I want to do is, hide the character's inventory, something that could be done in previous versions, but I don't know how to do it now.
- Fri May 02, 2025 12:24 pm
- Forum: Gameplay Help
- Topic: How to deactivate the Flat character GUI
- Replies: 2
- Views: 615
How to deactivate the Flat character GUI
I want to see only the recipes and not the character's inventory.
- Thu May 01, 2025 6:05 pm
- Forum: Modding help
- Topic: GUI update (Help me, Please)
- Replies: 5
- Views: 1127
GUI update (Help me, Please)
Context
Some time ago I created my version of Star whit items, but I couldn't get the GUI to look like the Vanilla GUI.
Now that I'm updating it, I'm in the same place, I don't know what styles to use and in what sequence to use; I also didn't find updated guides on the subject.
I tried to check ...
Some time ago I created my version of Star whit items, but I couldn't get the GUI to look like the Vanilla GUI.
Now that I'm updating it, I'm in the same place, I don't know what styles to use and in what sequence to use; I also didn't find updated guides on the subject.
I tried to check ...