Search found 66 matches

by iUltimateLP
Wed Jul 22, 2015 12:44 pm
Forum: Modding help
Topic: control.lua get power environment?
Replies: 3
Views: 2270

control.lua get power environment?

Hi guys, is it possible to check with the control.lua if a entity has power around him and if yes how much (with around him i mean if its in the range of any electric pole).. I have my teleporter right now, but I dont find the right class to use. If I put it as a decorative everything works except t...
by iUltimateLP
Wed Jul 22, 2015 12:41 pm
Forum: Modding help
Topic: Getting player index in events like ontick?
Replies: 3
Views: 1903

Re: Getting player index in events like ontick?

So I finished my Teleporters Mod but now I need multiplayer support.. So the main teleporting thread is inside the game.on_tick event, but that does not give me the the player index so how do I get the player? I dont want to loop through every player every tick cause that would take lagg I think.. ...
by iUltimateLP
Tue Jul 21, 2015 8:36 pm
Forum: Modding help
Topic: Getting player index in events like ontick?
Replies: 3
Views: 1903

Getting player index in events like ontick?

So I finished my Teleporters Mod but now I need multiplayer support.. So the main teleporting thread is inside the game.on_tick event, but that does not give me the the player index so how do I get the player? I dont want to loop through every player every tick cause that would take lagg I think..
by iUltimateLP
Tue Jul 21, 2015 6:31 pm
Forum: Modding help
Topic: On_PrePlayer_Mined_Entity entity cannot be table.removed?
Replies: 5
Views: 2071

Re: On_PrePlayer_Mined_Entity entity cannot be table.removed?

So I have another problem with my teleporter mod... How do I make this function for multiplayer?
So the main functions with teleporting are made inside the ontick event, but that does not give the playerindex back, so how do I get the player(index) to make things with him?
by iUltimateLP
Tue Jul 21, 2015 6:31 pm
Forum: Modding help
Topic: From game.player to game.players[index]...
Replies: 1
Views: 1296

From game.player to game.players[index]...

So I have another problem with my teleporter mod... How do I make this function for multiplayer?
So the main functions with teleporting are made inside the ontick event, but that does not give the playerindex back, so how do I get the player(index) to make things with him?
by iUltimateLP
Tue Jul 21, 2015 5:44 pm
Forum: Modding help
Topic: On_PrePlayer_Mined_Entity entity cannot be table.removed?
Replies: 5
Views: 2071

Re: On_PrePlayer_Mined_Entity entity cannot be table.removed?

orzelek wrote:In the on init and on load events write line like this:

Code: Select all

global.links = global.links or {}
It will initialize the global.links table if it's not yet initialized.
Great thanks! Now will do all that multiplayer related stuff like changing game.player into game.players[event.playerindex]
by iUltimateLP
Tue Jul 21, 2015 5:21 pm
Forum: Modding help
Topic: On_PrePlayer_Mined_Entity entity cannot be table.removed?
Replies: 5
Views: 2071

Re: On_PrePlayer_Mined_Entity entity cannot be table.removed?

The function table.remove accepts an index and removes the object at that index from the table. Imagine you insert entity 1-5 into a table, you'll have the table ents = {ent1, ent2, ent3, ent4, ent5} To remove ent3 you'll have to do table.remove(ents, 3). The table is now: ents = {ent1, ent2, ent4,...
by iUltimateLP
Tue Jul 21, 2015 3:52 pm
Forum: Modding help
Topic: On_PrePlayer_Mined_Entity entity cannot be table.removed?
Replies: 5
Views: 2071

On_PrePlayer_Mined_Entity entity cannot be table.removed?

Hey guys, Im working at a simple teleporter mod. I already did all the mechanics such as linking teleporters with a specific tool and going through the teleporters, but now I got a problem. So I carry all teleporter links inside a table called "links". A entry inside this table looks like ...
by iUltimateLP
Tue Jul 21, 2015 1:23 pm
Forum: Releases
Topic: Version 0.12.0
Replies: 165
Views: 139090

Re: Version 0.12.0

Another scripting question, what happend with the defines container?
Tried this:

Code: Select all

/c game.on_event(defines.events.ontick, function() game.players[1].print("hi") end)
but it keeps saying that theres no defines variable in LuaGameScript... Any help?
by iUltimateLP
Sun Jul 19, 2015 9:45 am
Forum: Mods
Topic: Introduction, Downloads & Release history
Replies: 73
Views: 103208

Re: Introduction, Downloads & Release history

Will you release a update for the brand new 0.12 update?
by iUltimateLP
Fri Jul 17, 2015 7:33 pm
Forum: Releases
Topic: Version 0.12.0
Replies: 165
Views: 139090

Re: Version 0.12.0

Awesome!! I really like the roads! So I went along to test the test mode mod. It boots, but when I try to enter a game, it says __test-mode__\18: LuaGameScript doesn't contain key oninit. So you guys moved the events? I cant use game.oninit, game.onload, and game.ontick. Where is it now? Thanks! pu...
by iUltimateLP
Fri Jul 17, 2015 7:28 pm
Forum: Releases
Topic: Version 0.12.0
Replies: 165
Views: 139090

Re: Version 0.12.0

Awesome!! I really like the roads! So I went along to test the test mode mod. It boots, but when I try to enter a game, it says

Code: Select all

__test-mode__\18: LuaGameScript doesn't contain key oninit.
So you guys moved the events? I cant use game.oninit, game.onload, and game.ontick. Where is it now?
Thanks!
by iUltimateLP
Wed Jun 03, 2015 10:34 am
Forum: Implemented mod requests
Topic: [Request] onentityclick event
Replies: 4
Views: 9570

[Request] onentityclick event

So I tried to spawn an entity and when i click on that entity it should come up with a gui, but in the wiki i haven't found any event for this, e.g. game.onentityclick or something.
Is there something like this and I dont find it? If not, I would like to have it :D

Thanks!
by iUltimateLP
Mon Jun 01, 2015 2:40 pm
Forum: Modding help
Topic: FlyingText?
Replies: 3
Views: 1425

Re: FlyingText?

Is there a possibilty to change the text size?
by iUltimateLP
Mon Jun 01, 2015 11:53 am
Forum: Modding help
Topic: FlyingText?
Replies: 3
Views: 1425

Re: FlyingText?

ThaPear wrote:Example usage:

Code: Select all

game.createentity({name="flying-text", position=game.player.position, text="HELLO", color={r = 0.8, g = 0.4, b = 0}}) 
Thanks!
by iUltimateLP
Sun May 31, 2015 6:34 pm
Forum: Modding help
Topic: FlyingText?
Replies: 3
Views: 1425

FlyingText?

Hey, anybody knows about the FlyingText entity? I know that it can be spawned, but any parameter to set text and color? The wiki says nothing about it..
Thanks!
by iUltimateLP
Sun May 31, 2015 12:25 pm
Forum: Modding help
Topic: How to make a spritesheet?
Replies: 2
Views: 1842

Re: How to make a spritesheet?

I haven't used piskel myself yet, but I have been able to gather some information from the files from the assembling machine 1. First, the code part: you can find the file here in this path: data\base\prototypes\entity\demo-entities.lua If you use N++, then you can use ctrl+f to search to the assem...
by iUltimateLP
Sat May 30, 2015 2:19 pm
Forum: Modding help
Topic: How to make a spritesheet?
Replies: 2
Views: 1842

How to make a spritesheet?

Hello guys, I created with Piskel those 33 frames (https://drive.google.com/file/d/0B_kkwi64gdF7dXVIeGtrbnZnTzA/view?usp=sharing), but when I try to put them in a sprite sheet, it always fails in visual in the game. The animation is not on one place its like the machine hovers above the ground and y...
by iUltimateLP
Mon May 25, 2015 10:53 am
Forum: Modding help
Topic: Path does not match any mod, but path is correct!
Replies: 8
Views: 8605

Re: Path does not match any mod, but path is correct!

itzJanuary wrote:I think I understand what your problem is now.

The actual path has to be:
"Factorio/Mods/TestItems_0.0.1/something/axe.png"

but in the lua files it should be:
"__TestItems__/something/axe.png"
Already fixed, but thanks for help! :)
by iUltimateLP
Mon May 25, 2015 10:47 am
Forum: Modding help
Topic: Path does not match any mod, but path is correct!
Replies: 8
Views: 8605

Re: Path does not match any mod, but path is correct!

prg wrote:The version number needs to be in the actual path where the mod is in, but not when you refer to it in the item definition.
It worked! Thanks!

Go to advanced search