Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!

Join the forum, it's quick and easy

Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Get_color engine

4 posters

Go down

Get_color engine Empty Get_color engine

Post by jora Fri Jun 12, 2009 9:10 am

Here you learn how to choose your own color (for example: background and text).

make an object with a sprite (doesn't matter what kind of sprite) and by create type:
Code:
c = get_color(c_black); //here you can choose the color you want to have for background
d = get_color(c_white); //here you can choose the color you want to have for text

and in left pressed event type:
Code:

c = get_color(c_black);
draw_set_color(" + string(c) + ");

d = get_color(c_white);
draw_set_color(" + string(d) + ");

and in draw event put:
Code:

draw_sprite(sprite0,0,x,y)
draw_set_color(d)
draw_text(300,64,'Hello want to get colors click the ball!#For Background color and for text color!')

background_color=c


than put the object in the room and run it.
if you have any question tell me... (YYG: jora)

PS: i realy don't know how you can make that when the room starts the "choose the color" box doesn't pop up only when you click the ball... so if you know that tell me please ! Smile

jora
jora
GameML Noob
GameML Noob

Posts : 1
Points : 54355
GameML Reputation : 3
Join date : 2009-06-12

http://www.jorasgames.webs.com

Back to top Go down

Get_color engine Empty Re: Get_color engine

Post by 3d Tue Jun 30, 2009 5:00 pm

Nice!!!!
3d
3d
Admin
Admin

Posts : 1227
Points : 66176
GameML Reputation : 66
Join date : 2009-05-31
Age : 41
Location : U.S.A

https://gameml.forumotion.com

Back to top Go down

Get_color engine Empty Re: Get_color engine

Post by TheGameMaker Thu Jul 02, 2009 11:46 am

Kinda simple...
TheGameMaker
TheGameMaker
GameML Basic
GameML Basic

Posts : 67
Points : 54507
GameML Reputation : 5
Join date : 2009-06-05
Age : 30

Back to top Go down

Get_color engine Empty Re: Get_color engine

Post by 3d Thu Jul 02, 2009 3:41 pm

yeh
3d
3d
Admin
Admin

Posts : 1227
Points : 66176
GameML Reputation : 66
Join date : 2009-05-31
Age : 41
Location : U.S.A

https://gameml.forumotion.com

Back to top Go down

Get_color engine Empty Re: Get_color engine

Post by slayer 64 Sun Jul 05, 2009 12:24 pm

to set the colors when you click on the ball, the left press event should be a global left press event with this code in it. the first line checks if the object meets itself at the mouse position.
Code:
if position_meeting(mouse_x,mouse_y,self)
{
    c = get_color(c_black);
    draw_set_color(c);

    d = get_color(c_white);
    draw_set_color(d);
}
slayer 64
slayer 64
GameML Noob
GameML Noob

Posts : 20
Points : 54155
GameML Reputation : 8
Join date : 2009-07-05
Age : 34

Back to top Go down

Get_color engine Empty Re: Get_color engine

Post by 3d Sun Jul 05, 2009 1:46 pm

cool! Thanks for adding to this slayer, when jora is on, he'll add to the topic.
3d
3d
Admin
Admin

Posts : 1227
Points : 66176
GameML Reputation : 66
Join date : 2009-05-31
Age : 41
Location : U.S.A

https://gameml.forumotion.com

Back to top Go down

Get_color engine Empty Re: Get_color engine

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum