Jump to content


Photo

delete...


  • Please log in to reply
4 replies to this topic

#1 marsiic

marsiic

    GMC Member

  • GMC Member
  • 787 posts
  • Version:GM:Studio

Posted 26 August 2010 - 12:44 PM

Hi!.. am - first sorry for my language!.. :)

but i need to make shadow for player and so i am trying to make feet gradient transparet!..

i hawe this feet Posted Image and this gradient field Posted Image and need to get this Posted Image!..

is it ewen possible? kinda trying to do with blend but doesnt work? any ideas?

thx for at least looking at this topic!.. :)

Edited by marsiic, 25 April 2011 - 06:00 PM.

  • 0

#2 Medusar

Medusar

    GMC Member

  • GMC Member
  • 1228 posts
  • Version:GM:Studio

Posted 26 August 2010 - 02:16 PM

Yes, it's very possible. You don't even need blend modes. Copy the gradient sprite if you need it again later and use sprite_set_alpha_from_sprite().
  • 0

#3 marsiic

marsiic

    GMC Member

  • GMC Member
  • 787 posts
  • Version:GM:Studio

Posted 26 August 2010 - 03:55 PM

Yes, it's very possible. You don't even need blend modes. Copy the gradient sprite if you need it again later and use sprite_set_alpha_from_sprite().



thanks for quick answer - but as i sayd - i need it for shadow - and shadow comes from using same sprite just with image_yscale=-1
and when i use sprite_set_alpha_from_sprite() both feet and shadow have same transparency!..
so i was more thinking of using blend for shadow to blend two sprites together - but i just cant get it work!.. :)

btw feet uses animation shadow just copyes same animation!..

Edited by marsiic, 26 August 2010 - 04:11 PM.

  • 0

#4 Rion

Rion

    GMC Member

  • New Member
  • 82 posts

Posted 26 August 2010 - 04:23 PM

It is simple, as said Medusar use sprite_set_alpha_from_sprite(spr_feet,spr_gardient) and write it to step event.
  • 0

#5 xot

xot

    GMC Dismember

  • Retired Staff
  • 4772 posts
  • Version:GM:Studio

Posted 26 August 2010 - 06:48 PM

I don't think that will work. As far as I know you can only set the alpha once per sprite. This could be most easily solved with duplicate sprites. You could generate them at the start of the game, or as needed when an instance is created (being careful to duplicate them only once). There are also ways to achieve this with surfaces but surfaces increase the complexity of the draw event and might not be as compatible.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users