[ 3 posts ]  Reply to topicPost new topic 
Author Message
 [zz]
 Post subject: drawing tiled backgrounds by using my own system [SOLVED]
PostPosted: Sat Dec 04, 2010 8:09 pm 
User avatar
Lucario and/or Braixen = best avatar
Member
[*]
[*]
[*]
[*]
[*]

I am making my own background system for my project and everything with the system is working perfectly except for one thing: There are no functions in GM for drawing a background resource horizontally, and/or vertically tiled except the ones for the default built-in background system for GM.

I need to know if anyone can help me get what I'm aiming for. A function or some code that allows you to draw backgrounds horizontally and/or vertically tiled (without the built-in system).

Help would be greatly appreciated.


Last edited by smbmaster99 on Sun Dec 05, 2010 10:16 pm, edited 1 time in total.
_________________
Games I've made:

Spoiler:

Fangame(s) I support:
Spoiler:


You can find me on:
Image Image Image Image Image


These are my Smashers of choice:
Image
 
Top
Offline 
 
 
 [us]
 Post subject: Re: drawing tiled backgrounds by using my own system
PostPosted: Sun Dec 05, 2010 12:16 am 
User avatar
Member
[*]
[*]
[*]
[*]
[*]

[*]
I've had that same problem before, and here's something I just whipped up, not sure if it works though.
Code:
//draw_background_horizontal(back,x,y,timesrepeated)
i=0;
repeat(argument3){
    draw_background(argument0,argument1+background_get_width(argument0)*i,argument2);
    i+=1;
}


or for vertical:
Code:
//draw_background_vertical(back,x,y,timesrepeated)
i=0;
repeat(argument3){
    draw_background(argument0,argument1,argument2+background_get_height(argument0)*i);
    i+=1;
}

_________________
 
Top
Offline 
 User page at mfgg.net
 
 [zz]
 Post subject: Re: drawing tiled backgrounds by using my own system
PostPosted: Sun Dec 05, 2010 10:15 pm 
User avatar
Lucario and/or Braixen = best avatar
Member
[*]
[*]
[*]
[*]
[*]

holy smokes I'm stupid :laugh: All the jabber I put together, and it could have been straight to the point as this one XP
I've used that technique before for other stuff, but forgot all about it ^( ^;
After merging and recoding some of the codes, I finally got exactly what I was after :soveryhappy:

thanks Jeff, your a life-saver ^( ^

_________________
Games I've made:

Spoiler:

Fangame(s) I support:
Spoiler:


You can find me on:
Image Image Image Image Image


These are my Smashers of choice:
Image
 
Top
Offline 
 
 
« Previous topic | Next topic »
Display posts from previous:  Sort by  
 [ 3 posts ]  Reply to topicPost new topic 


Who is online

Users browsing this topic: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group