questions

Game Editor comments and discussion.

Re: questions

Postby Fojam » Sat Jan 22, 2011 9:06 pm

sorry to bug you again but when i put the code you gave me in a create actor event for the levelpreview window:
Code: Select all
void DrawBmp(double Size)
{
    int i,j;
    for(i=0;i<BGImgW;i++)
    {
        for(j=0;j<BGImgH;j++)
        {
            setpen(BG_BMP[i][j][2],BG_BMP[i][j][1],BG_BMP[i][j][0],0,Size);
            putpixel(i*Size,j*Size);
        }
    }
}


I get:

Code: Select all
Error line 2: Illegal function definition in ex82626242918
Error line 13: Expected ;
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: questions

Postby Game A Gogo » Sat Jan 22, 2011 9:41 pm

the functions goes in the global script, so you can later use them like any other functions in GE

So DrawBmp and ImpBmp goes in global script, while in create actor you'd use:
Code: Select all
ImpBmp("Level1Icon.bmp");
DrawBmp(1);
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: questions

Postby Fojam » Sat Jan 22, 2011 11:13 pm

still not working
im using a collision script on the ticker actor to make it work, but it still isnt working?
do you think you could fix it and upload it?
Attachments
game.zip
(441.42 KiB) Downloaded 76 times
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: questions

Postby Game A Gogo » Sun Jan 23, 2011 12:14 am

you can only draw a bitmap in a canvas with this code.
therefore, you need to store your nothing seleted image.
Here is the updated version, I also modified other things in order for it to work properly, like disable collision on BG actors, since ticker now checks if it's not colliding with anything to display Nothing Selected.

It seems also you can't load from directories as well, unfortunatly.. this may be a huge inconvenience for you S:
Attachments
fojam.zip
(449.52 KiB) Downloaded 70 times
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: questions

Postby Fojam » Sun Jan 23, 2011 12:18 am

its fine i can live with not loading from directories

thanks!
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: questions

Postby Game A Gogo » Sun Jan 23, 2011 12:38 am

Also, strangely, 102x102 doesn't work, but 100x100 works. I guess it only works for multiple of 4, which is strange since I made it to work ortherwise with fseek and modulus 4
and it's also normal it lags a bit (a second for me) for loading a bitmap, 1024x1024 can take 30 seconds to load.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: questions

Postby Fojam » Sun Jan 23, 2011 12:43 am

i noticed. if it really becomes an issue i can just make smaller icons
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: questions

Postby Game A Gogo » Sun Jan 23, 2011 12:44 am

and use my Size function in DrawBmp :)
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest