View Full Version : I was so blind... ;_;
RedNax
02-08-2007, 04:04 PM
Searched all over the net for a community of game designers and there was one right here in S.A! Noooooo! Thats what I get for not having bought a PC mag in the last 2 years -_-
Anyway, I tried starting to create games using C++ but my knowledge with the language is still to little so, taking advice, I am now using Game Maker 7. Yay!
Now, down to one question I'd like to ask the nice, helpful people... is there a way to set the opacity of images in Game Maker? For example, I want to make clouds fly overhead but I don't want the cloud to be in the way. I've only been using Game Maker for 2 days now so excuse me if I'm asking a stupid question here.
~RedNax
Miktar
02-08-2007, 04:14 PM
Do to transparency like that, you must register Game Maker, sadly.
EDIT: Read below.
yes, the images alpha I believe is what you want to set.
1 being fully visible, 0 being invisible. (0.5 being half transparent)
the variable being:
image_alpha
so in your objects create event you would just need to run a piece of code setting this to the amount of transparency you want.
hope this helps. :)
Do to transparency like that, you must register Game Maker, sadly.
I use unregistered version and it works. I havent had issues with opacity due to being registered or not.
dislekcia
02-08-2007, 04:20 PM
Yup, you can use the image_alpha variable on an object to change it's overall alpha. There are ways to change alpha with specific drawing commands too, which is what Miktar was referring to... GM7 also added the ability to load images with alpha channels (things like tiff files) which should allow for gradiated transparency without having to register, previously you had to load a seperate black and white sprite and use the registered-only command sprite_set_image_alpha(sprite, alphaSprite) to change the alpha channel.
-D
RedNax
02-08-2007, 05:29 PM
Thanx guys =D
I'll have to take some time and scan trough that help-file for some more useful variables. ^^
dislekcia
02-08-2007, 05:45 PM
Thankfully GM's help is excellent :)
-D
Nandrew
02-08-2007, 08:19 PM
I'll second that. A lot of care has gone into the docs and I've yet to come across an issue which the help file hasn't addressed wonderfully. :)
Tr00jg
04-08-2007, 01:45 PM
Hmmm... you could also use an archaic method. As you might know, the background area is transparent in the sprites. There is a tool in the sprite editor to make your sprite transparent. All this really does is punch tiny holes all over your sprite which is set to the background color.
You cant do this on the fly, like image_alpha though.
Powered by vBulletin® Version 4.2.4 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.