r=0;
r=255;
switch(cloneindex)
{
case 0:
move=0;
dir=0;
MoveTo("Button.3", 0.000000, 0.000000, 1000.000000, "sensLeft", "");
MoveTo("Button.2", 0.000000, 0.000000, 10000.000000, "sensRight", "");
break;
case 1:
move=1;
dir=1;
MoveTo("Button.3", 0.000000, 0.000000, 1000.000000, "sensRight", "");
MoveTo("Button.2", 0.000000, 0.000000, 10000.000000, "sensLeft", "");
break;
case 2:
if(canjump>0)
{
PlaySound2("data/Mario Jump.wav", 0.200000, 1, 0.000000);
player.yvelocity-=20;
canjump--;
move=3;
}
break;
case 3:
if(huge==3)
{
CreateTimer("player", "shoot dude", 20);
}
break;
}
skydereign wrote:Now to address your actual problem, what in this has to do with movement? Is the movement code in the player's draw? As nothing else has to do with moving anything. Also what are the buttons? Button.0 seems to be a stop button as it sets move to 0, and 1 seems to be a move right. 2 is jump, and 3 is attack. Is that right?
switch(move)
{
case 0:
break;
case 1:
switch(dir)
{
case 0:
player.x-=5;
break;
case 1:
player.x+=5;
break;
}
break;
}
move=3;
switch(cloneindex)
{
case 0:
move=0;
dir=0;
MoveTo("Button.3", 0.000000, 0.000000, 1000.000000, "sensLeft", "");
MoveTo("Button.2", 0.000000, 0.000000, 10000.000000, "sensRight", "");
break;
case 1:
move=1;
dir=1;
MoveTo("Button.3", 0.000000, 0.000000, 1000.000000, "sensRight", "");
MoveTo("Button.2", 0.000000, 0.000000, 10000.000000, "sensLeft", "");
break;
case 2:
if(canjump>0)
{
PlaySound2("data/Mario Jump.wav", 0.200000, 1, 0.000000);
player.yvelocity-=20;
canjump--;
}
break;
case 3:
if(huge==3)
{
CreateTimer("player", "shoot dude", 20);
}
break;
}
Users browsing this forum: No registered users and 1 guest