Codice: Seleziona tutto
else
{
var d1,d2,d3,d4;
d1 = draw_sprite_ext(argument0,false,x-40,y,1,1,0,c_white,0);
d2 = draw_sprite_ext(argument0,false,x-30,y,1,1,0,c_white,0);
d3 = draw_sprite_ext(argument0,false,x-20,y,1,1,0,c_white,0);
d4 = draw_sprite_ext(argument0,false,x-10,y,1,1,0,c_white,0);
}
Codice: Seleziona tutto
draw_sprite_ext(argument0,false,x-40,y,1,1,0,c_white,0);
draw_sprite_ext(argument0,false,x-30,y,1,1,0,c_white,0);
draw_sprite_ext(argument0,false,x-20,y,1,1,0,c_white,0);
draw_sprite_ext(argument0,false,x-10,y,1,1,0,c_white,0);
Codice: Seleziona tutto
//argument0 = sprite
//argument1 = x
//argument2 = y
//argument3 = tasto per movimento a destra
//argument4 = tast per movimento a sinistra
if keyboard_check(argument3) global.lastchar = "right";
else if keyboard_check(argument4) global.lastchar = "left";
if global.lastchar = "right" draw_sprite_ext(argument0,false,argument1,argument2,1,1,0,c_white,1);
else if global.lastchar = "left" draw_sprite_ext(argument0,false,argument1,argument2,-1,1,0,c_white,1);
if argument1 != global.oggx
{
var moin,segno;
moin = 0.05;
segno = sign(argument1-global.oggx);
draw_sprite_ext(argument0,false,x-40*segno,y,segno,1,0,c_white,0.2-moin);
draw_sprite_ext(argument0,false,x-30*segno,y,segno,1,0,c_white,0.4-moin);
draw_sprite_ext(argument0,false,x-20*segno,y,segno,1,0,c_white,0.6-moin);
draw_sprite_ext(argument0,false,x-10*segno,y,segno,1,0,c_white,0.8-moin);
global.oggx = argument1;
}
Codice: Seleziona tutto
//argument0 = sprite
//argument1 = x
//argument2 = y
//argument3 = tasto per movimento a destra
//argument4 = tast per movimento a sinistra
var spr;
if keyboard_check(argument3)
{
global.lastchar = "right";
global.alpha = 0;
}
if keyboard_check(argument4)
{
global.lastchar = "left";
global.alpha = 0;
}
if global.lastchar = "right" spr = draw_sprite_ext(argument0,false,argument1,argument2,1,1,0,c_white,1);
if global.lastchar = "left" spr = draw_sprite_ext(argument0,false,argument1,argument2,-1,1,0,c_white,1);
//Settings delle ombre di velocità a destra
if argument1 > global.oggx
{
var moin;
moin = 0.025;
draw_sprite_ext(argument0,false,x-40,y,1,1,0,c_white,0.2-moin);
draw_sprite_ext(argument0,false,x-30,y,1,1,0,c_white,0.4-moin);
draw_sprite_ext(argument0,false,x-20,y,1,1,0,c_white,0.6-moin);
draw_sprite_ext(argument0,false,x-10,y,1,1,0,c_white,0.8-moin);
global.oggx = argument1
}
//Settings ombre di velocità ferme destra-sinistra
if argument1 = global.oggx && global.lastchar = "right"
{
var moin;
image_alpha = global.alpha;
moin = 0.25 + image_alpha;
draw_sprite_ext(argument0,false,x-40,y,1,1,0,c_white,0.2-moin);
draw_sprite_ext(argument0,false,x-30,y,1,1,0,c_white,0.4-moin);
draw_sprite_ext(argument0,false,x-20,y,1,1,0,c_white,0.6-moin);
draw_sprite_ext(argument0,false,x-10,y,1,1,0,c_white,0.8-moin);
}
if argument1 = global.oggx && global.lastchar = "left"
{
var moin;
image_alpha = global.alpha;
moin = 0.25 + image_alpha;
draw_sprite_ext(argument0,false,x+40,y,-1,1,0,c_white,0.2-moin);
draw_sprite_ext(argument0,false,x+30,y,-1,1,0,c_white,0.4-moin);
draw_sprite_ext(argument0,false,x+20,y,-1,1,0,c_white,0.6-moin);
draw_sprite_ext(argument0,false,x+10,y,-1,1,0,c_white,0.8-moin);
}
//Settings delle ombre di velocità a sinistra
if argument1 < global.oggx
{
var moin2;
moin2 = 0.025;
draw_sprite_ext(argument0,false,x+40,y,-1,1,0,c_white,0.2-moin2);
draw_sprite_ext(argument0,false,x+30,y,-1,1,0,c_white,0.4-moin2);
draw_sprite_ext(argument0,false,x+20,y,-1,1,0,c_white,0.6-moin2);
draw_sprite_ext(argument0,false,x+10,y,-1,1,0,c_white,0.8-moin2);
global.oggx = argument1;
}
Codice: Seleziona tutto
global.oggx = x;
global.oggy = y;
global.lastchar = "right";
global.alpha = 0;
Sì, anch'io purtroppo ho un sacco di compiti: ormai mi metto a lavoro solo i fine settimana.Super_Slascio ha scritto:ehm hai ragione ...
il fatto è che non avevo finito di creare lo script, infatti devo ancora migliorarlo, e mi ero dovuto fermare perchè avevo ancora troppi compiti da fare, quindi , visto che funzionava, non ho pensato di revisionarlo e lo ho subito inserito. Lo script pero non può essere sintetizzato come hai messo te perchè arrivano dei problemi con le ombre (le altre immagini con alpha maggiori).
Comincio subito a lavorarci su..
Prego...Super_Slascio ha scritto:Grazie...
(stavi scherzando vero???)