Welcome to Gaia! ::

Reply The Game Maker Guild of Gaia
Replacing sprite with a silhouette

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

Frozen_wolf
Vice Captain

PostPosted: Sat Dec 22, 2007 4:17 am



Is it possible to change a sprite into a coloured silhouette of that sprite? and change it back a few steps later?...
PostPosted: Mon Apr 07, 2008 7:50 pm


My only idea is to use time lines.

AnTiChRiStx15x79


moomoo112

PostPosted: Sat Jun 28, 2008 7:34 pm


i have something i think is what your going for...


when your making the sprite, in the area where you can edit the animation of it, under the tab go down to choose the number of slides and the color and then it will fade the non-transparent part of the image

and if u want it to fade back under the tab there is a button which should get it back to normal without any more complication

with this of course u need to add when the sprite will animate and blah.
PostPosted: Tue Jul 01, 2008 3:04 pm


Actually I was looking for a way to do it from a piece of code... One of the characters in the game I'm making has a "special mode" where he will be flashing red for a period of time...
I thought copying the moves he still could use during this mode and then painting them red was a waste (don't know if I'm just being cheap... we're talking about 10 sprites with varying frames)

I tried image_blend but it only made the sprite more red not the red silhouette I fought I needed... but since I couldn't find any other solution, I tried it and the teamleader accepted it... Just kept this open because I thought that if anyone knew, it would be a nice thing to know

moomoo is probably the one with the real solution if you want to use silhouettes in your games... but in case some of you wants to see how I used image_blend I'll post it...



//I used a timeline... In case you want an object to flash all the time I guess using that objects step event it's probably the way to go...

Step 0:
i = 0

Step 4:
//mod gives the remainder of a division. here if i is 20, i mod 2 is 0. if i is 21, i mod 2 is 1. basicly every time i is even, i mod 2 is 0
//white is the standard value. if you want to make the object white you should probably try gray or silver instead...
//see the Game Maker Help > Drawing Shapes for a list of colors

if(i mod 2 = 0)
{
Player.image_blend = c_red;
}
else
{
Player.image_blend = c_white;
}

//room_speed is the fps of the room. multiply that with how many seconds I want it to run and I got how many steps it would need to run. if i is equal to that it should stop, else it should count one up and then do it again

if(i = (room_speed*SpecialControl.SCTime))
{
timeline_position = 5;
}
else
{
i = i + 1;
timeline_position = 4;
}

Frozen_wolf
Vice Captain

Reply
The Game Maker Guild of Gaia

 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum