Search found 25 matches
- Sat May 10, 2014 8:52 am
- Forum: Support and Development
- Topic: Stuck with functions
- Replies: 5
- Views: 2795
Re: Stuck with functions
Thanks all for response. And i have one more question. How to separate code which handle menu into other script and make it works? Is it possible? Yes, it is possible to call functions from another file. you could turn this code: function love.draw() -- Drawing particles love.graphics.draw(menu_bg_...
- Sat May 10, 2014 8:10 am
- Forum: Support and Development
- Topic: Stuck with functions
- Replies: 5
- Views: 2795
Re: Stuck with functions
Is it bad that this is how I would do this? function love.load() -- can store all of the buttons here for later use -- buttons[i] = {name, location, x, y} buttons = {} buttons[1] = {enter, "images/enter.png" 100, 100} buttons[2] = {exit, "images/exit.png" 200, 100} for i = 1,#but...
- Sun May 04, 2014 11:31 pm
- Forum: Support and Development
- Topic: Help with 'math.random'
- Replies: 10
- Views: 4094
Re: Help with 'math.random'
when using math.random() you generate a number relative to the time that the application starts. Or that's at least how I think of it... This will get ya the same number everytime... What math.random uses is something called a seed to help actually make things appear random (even though there're st...
- Sun May 04, 2014 11:10 pm
- Forum: Support and Development
- Topic: Help with 'math.random'
- Replies: 10
- Views: 4094
Re: Help with 'math.random'
Just replaced it math.random with love.math.random. It behaves differently, but still doesn't fix my problem (still spits out the same number each time the program is reloaded.)foo0 wrote:You're using math.random, you probably were using love.math.random before.
- Sun May 04, 2014 10:49 pm
- Forum: Support and Development
- Topic: Help with 'math.random'
- Replies: 10
- Views: 4094
Help with 'math.random'
Hey guys, I have looked for a solution and can't find one anywhere. Whenever I try to use math.random in love.load, it spits out the exact same number every time. I have used it in the past (never in love.load), and have never had this problem. Any help would be greatly appreciated.
Thanks
Thanks
- Sun Mar 09, 2014 8:04 am
- Forum: Libraries and Tools
- Topic: [Beta] HugoBDesigner File Manager [v0.5]
- Replies: 24
- Views: 16957
Re: [Beta] HugoBDesigner File Manager [v0.4a]
This looks great, I'll have to try it out later!
- Fri Aug 16, 2013 4:50 am
- Forum: Games and Creations
- Topic: Unnamed Minimal RPG
- Replies: 29
- Views: 13114
Re: Unnamed Minimal RPG
Looks great, keep it up!
- Wed Aug 14, 2013 9:40 pm
- Forum: Support and Development
- Topic: Dual Mice
- Replies: 17
- Views: 6685
Re: Dual Mice
This just gave me a cool idea ^.^SimonLarsen wrote:Of course nobody is making a game where a single person operates two mice.
- Wed Aug 14, 2013 9:30 pm
- Forum: Support and Development
- Topic: Character with animation
- Replies: 27
- Views: 17400
Re: Character with animation
I've come up with what I think Is a better way to do this. Keep in mind that I am pretty new to love. Let me know if this way is efficient: function love.load() animation = {} animation[1] = love.graphics.newImage('FirstPartOf-Walking-Animation.png') animation[2] = love.graphics.newImage('SecondPart...
- Sat Aug 10, 2013 5:32 pm
- Forum: Support and Development
- Topic: Character with animation
- Replies: 27
- Views: 17400
Re: Character with animation
Try this: function love.load() animation = {} frame = 0 animation.frame = 1 animation.frame1 = (untitled) animation.frame2 = (untitled1) animation.frame3 = (untitled2) animation.image = animation.frame1 end function love.update(dt) if animation.frame ==1 then animation.image = animation.frame1 frame...