sorry, came across this old request and seemed worth answering...
Creating a x/y infinite tiled "region"
1. create a Actor (Normal) called wallpaper (or your choice of name) and add an animation
2. create another Actor (Canvas) and in the Create Actor event of the canvas actor insert following
- Code: Select all
int i,j;
for (i=0;i<width;i=i+wallpaper.width)
{
for (j=0;j<height;j=j+wallpaper.height)
{
draw_from("wallpaper",wallpaper.width/2+i,wallpaper.height/2+j, 1);
}
}
1. is that what was wanted ?
2. if you want to change animations in mid game (after create actor) place code in the canvas's "Draw Actor" event but use a "flag: variable or something, so it only redraws when needed.
3. is there any way to use draw_from in a global script ? So I can create a function called wallpaper() to do this automatically ?
feral