Search found 7 matches

by RandomUserName
Mon May 28, 2018 9:11 am
Forum: Support and Development
Topic: [Solved]For loop runnning longer than it's supposed to
Replies: 8
Views: 4942

Re: [Solved]For loop runnning longer than it's supposed to

Thank you for your Contribution.
I was trying to implement something similar, but your code does what I want it to.
by RandomUserName
Sun May 27, 2018 8:52 am
Forum: Support and Development
Topic: [Solved]For loop runnning longer than it's supposed to
Replies: 8
Views: 4942

Re: [Solved]For loop runnning longer than it's supposed to

Ok, so my map is made up of Hexagonal Tiles that are offset in the y Direction (the flat sides are on the top and bottom). The Tiles are identified by a single coordinate that increases by 1 for every Column and by 100 for every Row. So basically: 1 2 3 .. 99 100 101 102 103 .. 199 200 201 202 203 ....
by RandomUserName
Sat May 26, 2018 7:31 pm
Forum: Support and Development
Topic: [Solved]For loop runnning longer than it's supposed to
Replies: 8
Views: 4942

Re: For loop runnning longer than it's supposed to

Ok so the following code does what I want: function unitMovementRadius(position,range) local radius={} local radiusold={} table.insert(radius,position) for i=1,range do for j,position in ipairs(radius) do table.insert(radiusold,position) end for j,position in ipairs(radiusold) do table.insert(radius...
by RandomUserName
Sat May 26, 2018 6:55 pm
Forum: Support and Development
Topic: [Solved]For loop runnning longer than it's supposed to
Replies: 8
Views: 4942

Re: For loop runnning longer than it's supposed to

I expect this code to define two local tables, insert the first Argument at the first position in the first table. Copy the modified table onto the other one. Right now the for loop should only go through one Interation, where it inserts a bunch of values into the first table and return it in the en...
by RandomUserName
Sat May 26, 2018 6:32 pm
Forum: Support and Development
Topic: [Solved]For loop runnning longer than it's supposed to
Replies: 8
Views: 4942

[Solved]For loop runnning longer than it's supposed to

This function is passed two Numbers, position is between 1 to 10,000 and range is between 1 to 10. When I call the function the game locks up and eventually just closes, presumably because it fills up its Share of Memory. The length of radiusold is 1, however when I put a "print(i)" in the...
by RandomUserName
Tue May 15, 2018 11:35 am
Forum: Support and Development
Topic: Use Quad as Mesh Texture
Replies: 3
Views: 2884

Re: Use Quad as Mesh Texture

Thanks, I'm now creating the Mesh in a for loop while using setDrawRange to get the desired uv coordinates.
by RandomUserName
Mon May 14, 2018 12:55 pm
Forum: Support and Development
Topic: Use Quad as Mesh Texture
Replies: 3
Views: 2884

Use Quad as Mesh Texture

My Games Map is based on textured Meshes. It works fine if I'm using a static Image as the Texture. Now I'm trying to animate the Maps Tiles by using Quads in a Sprite Sheet as the Texture for the Meshes and switch them for every step in the Animation. Problem being that Mesh:setTexture doesn't acce...