Search found 49 matches

by AlexCalv
Sun Sep 28, 2014 5:42 am
Forum: Support and Development
Topic: How can i make a Player that Jump Up and Falls Down
Replies: 9
Views: 6098

Re: How can i make a Player that Jump Up and Falls Down

The simplest way would be to just put it into love.load.

Code: Select all

function love.load()
     gravity = [[Whatever works for your game]]
end
by AlexCalv
Mon Sep 22, 2014 3:44 am
Forum: Support and Development
Topic: How can i make a Player that Jump Up and Falls Down
Replies: 9
Views: 6098

Re: How can i make a Player that Jump Up and Falls Down

counterman2026 wrote:help!, it says that there is an error to perform on global 'gravity'(a nil value)
You need to define the variable gravity.
by AlexCalv
Tue Aug 12, 2014 8:57 pm
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Re: Creating multiple highscores?

Maybe programming isn't my thing. This frustrates me so much because I try to learn and want to but I can't. I feel like reading that over 3-4 times helped me a little bit to understand tables better but I still don't understand how to make this work. The highscores don't work at all now. It just co...
by AlexCalv
Tue Aug 12, 2014 6:49 am
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Re: Creating multiple highscores?

Are bumps allowed? I'm very confused on how this all works. Tables are very confusing to me. The only thing I've used them for so far is to make enemies.
by AlexCalv
Sat Aug 09, 2014 7:26 am
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Re: Creating multiple highscores?

Ah, didn't know setn was deprecated. Honestly, you don't need to check where a score belongs. Just add it to the list, sort the list, and then remove the last value. The outcome will always be the correct new highscore list. As for printing to the screen; you have to loop over the values and output...
by AlexCalv
Sat Aug 09, 2014 7:04 am
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Re: Creating multiple highscores?

I'm very confused as to how I could implement this into my game. I feel like I have to change everything to compensate for the changes. I'll just leave it how I have it currently, in my next game I'll design it with this in mind. One more thing though, how would I go about printing the scores to the...
by AlexCalv
Sat Aug 09, 2014 4:50 am
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Re: Creating multiple highscores?

Okay, that makes sense now. How would I go about checking if something is worthy of a highscore though? Atm I just check if the player.score is higher than the highscore and set the highscore to equal the player.score and then save the highscore in a file.
by AlexCalv
Fri Aug 08, 2014 8:59 pm
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Re: Creating multiple highscores?

Yeah I've used tables and know how they work for basic things I think. This sounds simple enough then, I never thought to use a table for this. How would I check what score would be needed for the different scores though? I could do this for the 1st place score, but how would I check if the score ca...
by AlexCalv
Fri Aug 08, 2014 7:32 pm
Forum: Support and Development
Topic: Creating multiple highscores?
Replies: 12
Views: 9047

Creating multiple highscores?

I'm trying to add a way to have multiple highscores in my game, but I can only get one. I also want them to order from greatest to least. This code sets the first highscore, but I have no idea how to check or even make other scores and save them to a file to load. function highscore_counter() if pla...