## Search found 18 matches

Sat Nov 07, 2015 11:05 pm
Forum: Support and Development
Topic: Choosing a colour only once
Replies: 10
Views: 1391

### Re: Choosing a colour only once

Thank you very much. Without you I couldn't have done this. Your example was perfect and it explained everything that I needed to know.
Sat Nov 07, 2015 9:58 pm
Forum: Support and Development
Topic: Choosing a colour only once
Replies: 10
Views: 1391

### Re: Choosing a colour only once

This works, but, now my spin function doesn't work. The spin function would make it so that it would make everything move 500 pixels to the left. x = x - 500 Now, this doesn't work, they just stay there. Also, this is probably expected but, whenever you open up the game again, it stays the same colo...
Sat Nov 07, 2015 9:41 pm
Forum: Support and Development
Topic: Choosing a colour only once
Replies: 10
Views: 1391

### Re: Choosing a colour only once

Unfortunately it didn't work. It doesn't draw a single box.
Sat Nov 07, 2015 9:27 pm
Forum: Support and Development
Topic: Choosing a colour only once
Replies: 10
Views: 1391

### Re: Choosing a colour only once

Sure, make the colour table constant: function pickAColour() reds = { 255, 0, 0 } blues = { 0, 0, 255 } Colours = { reds, blues } return Colours[ math.random(#Colours)] end local colour = pickAColour() function love.draw() love.graphics.setColor(colour) love.graphics.rectangle("fill", x+500, y, 75,...
Sat Nov 07, 2015 9:05 pm
Forum: Support and Development
Topic: Choosing a colour only once
Replies: 10
Views: 1391

### Choosing a colour only once

Hi, I am currently working on a case simulator type thing (from csgo). Yes, it's gonna look terrible but I'm doing it to improve on my Lua. I have made a function where it can choose a colour at random, to try and simulate the randomness of the selection. (This function will be worked on a bit more ...
Thu Oct 01, 2015 7:58 pm
Forum: Support and Development
Topic: HighScore
Replies: 7
Views: 874

### Re: HighScore

Yeah use tserial to turn the table to a string and save it to a file. And at the start of the game load the file and turn the string into a table again. I have tested around with this all, I have gotten the Tserial files to work, but I can't do the coding properly. If you could help me that would b...
Thu Oct 01, 2015 7:33 pm
Forum: Support and Development
Topic: HighScore
Replies: 7
Views: 874

### Re: HighScore

bobbyjones wrote:ivan he wants offline high scores lol. But offline high scores are as simple as saving a table with tserial and sorting it.
I just tried to use table, but, whenever you restarted the app, the table values would reset, how would you fix that?
Thu Oct 01, 2015 5:46 pm
Forum: Support and Development
Topic: HighScore
Replies: 7
Views: 874

### HighScore

Hello, I am kinda new to Lua coding. I have had some experience with Gmod, but that's about it, not much experience with 'Vanilla Lua'. I am making a game at the moment where there's a border around the screen, and you most use the arrow keys to keep yourself up, The more you press the arrow keys, t...