## Search found 38 matches

Thu Jun 04, 2020 6:39 pm
Forum: Support and Development
Topic: Attempting to implement a wait function in love.update
Replies: 5
Views: 6419

### Re: Attempting to implement a wait function in love.update

Thank you sphyrth, I am aware of how that's one way to do it. I was wondering if there was a way to make a wait() function that pauses the update function. Is this even possible in Love2D?
Wed Jun 03, 2020 11:28 pm
Forum: Support and Development
Topic: Attempting to implement a wait function in love.update
Replies: 5
Views: 6419

### Attempting to implement a wait function in love.update

Hi there, see title. I want to make something that prints "asd" every second. I am using love.update to do this, below is my code. local dt = 0 function love.update(...) wait(1) print("asd") end function wait(i) dt = dt + 1 if dt >= love.timer.getFPS() * i then -- what do i do from here? end end I f...
Tue Sep 10, 2019 9:21 pm
Forum: Games and Creations
Topic: Snake Game
Replies: 1
Views: 2767

### Snake Game

i made a simple snake game because why not ¯\_(ツ)_/¯

feel free to look at the source code and give me constructive criticism!
Fri Jun 14, 2019 7:16 pm
Forum: Support and Development
Topic: (Math Help) How do I round to the nearest 50?
Replies: 2
Views: 1870

### (Math Help) How do I round to the nearest 50?

I.E. 23 = 0 27 = 50 56 = 50 79 = 100 122 = 100 143 = 150 178 = 200 994 = 1000 Basically, if the last two digits are closer to 100, then it rounds it to 100. Otherwise, if the last two digits are closer to 50, then it rounds it to 50. Or if the last two digits are closer to zero, then it rounds it to...
Fri Jun 07, 2019 6:33 pm
Forum: Support and Development
Topic: [SOLVED] Dialog doesn't work on signs (I have no clue lmao)
Replies: 1
Views: 1184

### [SOLVED] Dialog doesn't work on signs (I have no clue lmao)

I'm trying to make an interactive system with signs by loading the sign text data from a .dat file. It seems to work only once, but after the first interaction, it doesn't work. I used some prints to debug this, and the issue is on this line: ttxt[ntxt] = ttxt[ntxt]:sub(5) This line is not only sett...
Fri May 31, 2019 5:28 pm
Forum: Support and Development
Topic: [SOLVED] I have no clue why, but my function only accepts integer numbers, not variables
Replies: 3
Views: 2474

### Re: I have no clue why, but my function only accepts integer numbers, not variables

pgimeno wrote:
Fri May 31, 2019 5:25 pm
tempd is a string. In Lua, "3" does not equal 3, therefore none of the comparisons in autoMove() matches.
so i just have to simply use tempd = tonumber(d)?

EDIT: i tried it, and it worked. thanks!
Fri May 31, 2019 5:17 pm
Forum: Support and Development
Topic: [SOLVED] I have no clue why, but my function only accepts integer numbers, not variables
Replies: 3
Views: 2474

### Re: I have no clue why, but my function only accepts integer numbers, not variables

update: i found out that when I use autoMove(tempd), it sets moving to true and it plays the movement animation, but it doesn't move the character. i have no clue why, because pl.d is equal to 3, but it's just not moving the player
Fri May 31, 2019 4:39 pm
Forum: Support and Development
Topic: [SOLVED] I have no clue why, but my function only accepts integer numbers, not variables
Replies: 3
Views: 2474

### [SOLVED] I have no clue why, but my function only accepts integer numbers, not variables

entdata = {1,0,6,3} -- a is the room number, b and c are the x and y coordinates for the next room, d is the direction (3 is right) local a,b,c,d = entdata[transport][1],entdata[transport][2],entdata[transport][3],entdata[transport][4] tempd = d loadMap(a,b,c,d) -- i use local variables because the...
Mon Aug 06, 2018 7:45 pm
Forum: Games and Creations
Topic: Improved Collision Test Game
Replies: 4
Views: 2392

### Re: Improved Collision Test Game

Darlex wrote:
Mon Aug 06, 2018 3:20 am

*Cough cough* That was a bad joke... sorry
despite this post being really old, i lol'd so hard at that. good job.
Thu Aug 02, 2018 9:20 pm
Forum: Games and Creations
Topic: draw crud
Replies: 0
Views: 1409

### draw crud

i made a short and simple test game that allows you to draw. here are all of the controls: left click to draw right click to erase < (,) and > (.) to decrease/increase brush size spacebar to toggle color changer up and down arrows (in color changer) to change to red, green, or blue left and right ar...