Search found 16 matches
- Sat Mar 31, 2018 12:26 am
- Forum: Support and Development
- Topic: How do I use a functions as parameter
- Replies: 3
- Views: 2805
Re: How do I use a functions as parameter
Yep as soon as you said the () i knew where I messed up. Should have caught that. That said for those of you wanting to know how I got this super simple image button hack method to work. Here is how I have my code laid out as of right now. Hope it helps someone out. Step 1: A function to check to se...
- Fri Mar 30, 2018 6:48 am
- Forum: Support and Development
- Topic: How do I use a functions as parameter
- Replies: 3
- Views: 2805
How do I use a functions as parameter
I'm trying to make a simple gui system for my game. And wanted to use something like this to draw an image in love.draw and call the function when clicked. function thm_imgbtn(x, y, sx, sy, img, hmg, func) -- Local Vars local mouseover local imgw = img:getWidth() * sx -- Button Image local hmgw = hm...
- Mon Jun 15, 2015 6:43 pm
- Forum: Support and Development
- Topic: Text Input and Chat Box
- Replies: 4
- Views: 3229
Re: Text Input and Chat Box
Thanks. I wish my code was half as nice as it looks. I have some awesome ideas for the storyline but its all about me deciding to finish a project for once.DeltaF1 wrote:This is looking really pretty!
- Mon Jun 15, 2015 4:44 pm
- Forum: Support and Development
- Topic: Text Input and Chat Box
- Replies: 4
- Views: 3229
Re: Text Input and Chat Box
Worked like a charm I didn't even know this was a love function.
Code: Select all
function love.textinput(t)
if Settings['state'] == "PLAYING" then Player1['input'] = Player1['input'] .. t end
end
- Mon Jun 15, 2015 4:13 pm
- Forum: Support and Development
- Topic: Text Input and Chat Box
- Replies: 4
- Views: 3229
Text Input and Chat Box
I'm in the beginning stages of making a chat box for my TextBased RPG. I thought I'd get some ideas on how to accomplish this task. Right now my thinking is is put the user text in a variable "Player1['input']" then when user hits enter Game parses the sentence and feeds back an answer and...
- Sat Feb 21, 2015 11:08 pm
- Forum: Support and Development
- Topic: Quad Help
- Replies: 4
- Views: 3071
Re: Quad Help
Shit son this maybe exactly what I need. When I get home I'll try it out. I'm not sure how I missed the Wiki on this. Thank you very much.DaedalusYoung wrote:[wiki]Quad:getViewport[/wiki]?
- Sat Feb 21, 2015 9:16 pm
- Forum: Support and Development
- Topic: Quad Help
- Replies: 4
- Views: 3071
Re: Quad Help
I'm not sure I explained myself very well. I want to get the values of q_display and set them to a variable.
q_display_x, q_display_y, q_display_w ect... this way i can always know how large the quad is I'm displaying. I'm going to use this for hitboxes/mouseovers/ect...
q_display_x, q_display_y, q_display_w ect... this way i can always know how large the quad is I'm displaying. I'm going to use this for hitboxes/mouseovers/ect...
- Sat Feb 21, 2015 8:36 pm
- Forum: Support and Development
- Topic: Quad Help
- Replies: 4
- Views: 3071
Quad Help
I have a list of quads for a small kids game. I wanted to know how would be the best way to pull out each variable in the quad and assign it to another variable. gr, down = love.graphics, love.keyboard.isDown q_state = 0 q_zero = gr.newQuad(0, 0, 128, 128, img.sprite:getDimensions()) q_one = gr.newQ...
- Mon Feb 02, 2015 8:03 am
- Forum: Support and Development
- Topic: Createing Endless Texture Background
- Replies: 10
- Views: 8917
Re: Createing Endless Texture Background
Thank you ref, this is exactly what I was looking for. Your example helped me understand what is going on in the code enough to figure it out. Much appreciated, thank you everyone.
- Sun Feb 01, 2015 5:42 am
- Forum: Support and Development
- Topic: Createing Endless Texture Background
- Replies: 10
- Views: 8917
Re: Createing Endless Texture Background
Ok I understand making the quad and repeating the image across the open window. My issue is as the player moves, I am moving the quad under him. How do I add and remove textures from the quad as needed to create a seem less world. Check out the .love file i edited for a better description. I'm tryin...