y -=2 image_alpha -=.04 if image_alpha < 0 instance_destroy()This makes it go up and slowly disappear
Alpha problems?
#1
Posted 06 November 2010 - 03:51 PM
#2
Posted 06 November 2010 - 04:07 PM
You need to define the variable "dir" in the create event and set it to 0.
dir+=10 y=ystart+lengthdir_y(20,dir) image_alpha-=0.04 if image_alpha<0 instance_destroy()
replace the 20 to make more pronounced movements and change dir to change the speed of them.
#3
Posted 06 November 2010 - 04:12 PM
How do I make it bounce normally then after a few seconds, it starts disappearing?try this:
You need to define the variable "dir" in the create event and set it to 0.dir+=10 y=ystart+lengthdir_y(20,dir) image_alpha-=0.04 if image_alpha<0 instance_destroy()
replace the 20 to make more pronounced movements and change dir to change the speed of them.
Edited by redfid, 06 November 2010 - 04:17 PM.
#4
Posted 06 November 2010 - 04:42 PM
the way I gave you or some other way?
#5
Posted 06 November 2010 - 04:44 PM
I mean bounce like you told me but without disappearing but after like 2 seconds it starts to disappear. I think it has something to do with alarms.by bounce normally what do you mean?
the way I gave you or some other way?
#6
Posted 06 November 2010 - 05:18 PM
if you want to do it differently though you can just create a variable called delay and set it to 60,
then subtract 1 from it each step and check if it is less than 0.
#7
Posted 06 November 2010 - 05:36 PM
Ok thanks it works but now I need to know how to make the level up object follow the player until it disappears.because you are just using alpha, you can just set the alpha higher than 1 in the create event, because an alpha of 2 is the same as 1.
if you want to do it differently though you can just create a variable called delay and set it to 60,
then subtract 1 from it each step and check if it is less than 0.
instance_create(obj_playersword.x,obj_playersword.y-40,obj_levelup)This creates it on top of the player's head but it doesn't follow him.
#8
Posted 06 November 2010 - 05:49 PM
x=obj_playersword.x
ystart=obj_playersword.y-40
Edited by Docopop.co.uk, 06 November 2010 - 05:50 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











