Jump to content


Photo

Removing A Little From The Surface


  • Please log in to reply
5 replies to this topic

#1 epicCreations

epicCreations

    Cool As Ace

  • New Member
  • 1241 posts

Posted 16 January 2010 - 05:05 AM

I've made it so that every step each object draws itself to the surface to create a trail. Unfortunately this trail doesn't ever fade, so I'm asking: How can I fade everything in a surface by an alpha? I've tried using bm_subtract in conjunction with clearing the screen in black (with an alpha), but that doesn't work, and since that doesn't work, I'm not sure what to try. Can anyone help me out?

epic Creations
  • 0

#2 Steve III

Steve III

    GMC Member

  • New Member
  • 180 posts

Posted 16 January 2010 - 05:10 AM

How about having a xprevious and yprevious like set of values that note where the object was, say, 3 seconds ago and draw, say, 5 images from oldest position to newest position with equal (or decreasing mabye?) spacing and increasing alpha value? Assuming you can draw the background to the surface at the beginning of each draw event then draw these images over the top of that. Anyway, doing this your trail will follow you and disappear after 3 seconds of being stationary.
  • 0

#3 Obj_Control

Obj_Control

    GM Mentor

  • New Member
  • 2561 posts

Posted 16 January 2010 - 05:10 AM

draw_clear_alpha(color,alpha);

That is, only if you only have the trail on the surface.

Edited by Obj_Control, 16 January 2010 - 05:11 AM.

  • 0

#4 epicCreations

epicCreations

    Cool As Ace

  • New Member
  • 1241 posts

Posted 16 January 2010 - 05:11 AM

draw_clear_alpha(color,alpha);


I've tried using bm_subtract in conjunction with clearing the screen in black (with an alpha), but that doesn't work, and since that doesn't work, I'm not sure what to try.

:P
  • 0

#5 Obj_Control

Obj_Control

    GM Mentor

  • New Member
  • 2561 posts

Posted 16 January 2010 - 05:44 AM

draw a rectangle?
  • 0

#6 A saurus1

A saurus1

    GMC Member

  • Sandbox Moderators
  • 1591 posts
  • Version:GM8.1

Posted 16 January 2010 - 10:59 AM

It won't work. Alpha is only ever added and multiplied as long as you keep multiplying the alpha by say .9999, it's never ever going to reach zero.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users