| |
Anyone know how to do a decent fog effect in GM?, Fixed.
Thingy |
|

So long MFGG 2.0~
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Minigame Comp Runner Up Badge (2) [*]](https://archive.mfgg.net/html/badges/mcr2.gif) ![Minigame Comp Third Place Badge (2) [*]](https://archive.mfgg.net/html/badges/mct2.gif) ![Secret Santa Badge [*]](https://archive.mfgg.net/html/badges/present.gif)

Group: Members
Posts: 1824
Member No.: 4642
Joined: 30-October 07
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (RetroXYZ @ Oct 31 2009, 12:25 AM) | sprite_set_alpha_from_sprite(sprite,mask)
sprite is the sprite to use mask is a grayscale mask to use (white is fully transparent, black is no transparency)
Take the mask and make a gradient circle (going from white in the middle to black on the outside) and use that on a whatever color box for a sprite and then draw that centered over the character. Then, use draw_rectangle to draw a solid color all around it. Alternatively, you can just make a sprite the size of the view, although I wouldn't recommend it. |
Can you elaborate on this please?
I tried the doing a sprite the size of the view first (since I originally had just a placeholder circle following the player around) but that didn't work (I had it draw the sprite, then use the alpha, is that right?) so I tried the rectangle thing, but I don't know what to do for colors 1, 2 and 3.
EDIT: also, while I have a topic, what's wrong with this code?
| CODE | if x < view_xview + 104 if x > view_xview if y < view_yview + 104 if y > view_yview var = distance_to_object(object0) sound_play(Step) sound_volume(Step,100-var) //this is placeholder until I work out what min and max volumes are |
This post has been edited by Thingy on Oct 31 2009, 03:37 AM
--------------------
|
|
|
orange452 |
|

...and brotha, I hurt people...
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif)

Group: Members
Posts: 519
Member No.: 3337
Joined: 21-February 07
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
| QUOTE (Thingy @ Oct 31 2009, 03:18 AM) | Can you elaborate on this please?
I tried the doing a sprite the size of the view first (since I originally had just a placeholder circle following the player around) but that didn't work (I had it draw the sprite, then use the alpha, is that right?) so I tried the rectangle thing, but I don't know what to do for colors 1, 2 and 3.
EDIT: also, while I have a topic, what's wrong with this code?
| CODE | if x < view_xview + 104 if x > view_xview if y < view_yview + 104 if y > view_yview var = distance_to_object(object0) sound_play(Step) sound_volume(Step,100-var) //this is placeholder until I work out what min and max volumes are |
|
if x < view_wview and x > view_xview and y < view_hview and y > view_yview then { var = distance_to_object(object0) sound_play(Step) sound_volume(Step,100-var) }
--------------------
************************************************************
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.0449 ] [ 13 queries used ] [ GZIP Enabled ] [ Server Load: 2.67 ]
| |