Fangames > Programming Questions

I need help to make the handling of line and shadow fading according to the move

(1/2) > >>

Junior Nintendista:
I was wondering how does the shadow of the image according to the movement.



For example : in the screenshot above, the line will disappear with the move, if you help me, I would be very grateful.

Anon70000:
Script:
(click to show/hide)///createShadow(alpha_speed,scale_speed);
//
//  creates a shadow of current object, often used in alarm or step events
//
//      alpha_speed     the value image_alpha decreases per step
//      scale_speed     the value image_xscale and image_yscale decreases per step
//
//
{
    var inst;
    inst = instance_create(x,y,objShadow);
    inst.sprite_index = sprite_index;
    inst.image_xscale = image_xscale;
    inst.image_yscale = image_yscale;
    inst.image_index = image_index;
    inst.image_speed = image_speed;
    inst.image_angle = image_angle;
    inst.image_blend = image_blend;
    inst.depth = depth+1;
    inst.alpha_speed=argument0;
    inst.scale_speed=argument1;
}objShadow (Visible, not solid)
Step Event:
(click to show/hide)//this object is created by script 'createShadow'
image_alpha -= alpha_speed;
image_xscale -= scale_speed;
image_yscale = image_xscale;
if(image_alpha<0 || image_xscale<0){
    instance_destroy();
}

Junior Nintendista:
I have to create the shadow from the line without creating a new object.

pieceofcheese87:
why?

Junior Nintendista:

--- Quote from: pieceofcheese87 on September 06, 2015, 11:49:48 AM ---why?

--- End quote ---
Because I'm doing I Wanna Call Me It and I Wanna Be The UltraPlayers for I Wanna Kill The Creator (medley game), and is line makes shadow without object.

(click to show/hide)

Navigation

[0] Message Index

[#] Next page

Go to full version