Problem with MOVE.OBJ.V command.

Robin_Gravel I used move.obj.v command for best effect but it's not work well.

Here, when Naturette's reading on a sign, a snowball will fall off to her.

The problem is the snowball stops on the blue line priority and
the logic 251 is used. Logic 251 is a death logic. In most fanmade game, the death logic is 94.

Move.obj works but not move.obj.v

Here's my code: I hope someone may help me.

if (isset(f5)) {
 load.pic(v0);
 draw.pic(v0);
 discard.pic(v0);
 set.horizon(2);
 load.view(40); // the snowball view
 reset(f100);
 reset(f101);
 if (v1==39){
  position(o0,1,165);
 }
 if (v26 == 3) {
   shake.screen(101);
 }
 v99 = v0;
 draw(o14); //icons used like DG: the agimouse adventure game.
 draw(o15); //
 draw(o16); //
 draw(o0);  //Naturette's view
 show.pic();
}
if (v27 == 1) {
if (v28 > 58 &&
    v29 > 115 &&
    v28 < 74 &&
    v29 < 129) {
 if (v120 == 1){
  if (!posn(o0,52,135,73,142)){
   //v111 is used to play Naturette 2 in french or english.
   if (v111==0){
    v21=11;
    print("C'est un paneau. Mais vous etes trop loin pour le lire.");
   }
   else{
    v21=11;
    print("It's a sign. But you're too far away to read on it.");
   }
  }
  else{
   if (v111==0){
    v21=11;
    print("Attention! Risque de chute de neiges.");
   }
   else{
    v21=11;
    print("Warning! Risk of falls of snows.");
   }
   program.control();

   get.posn(o0,v100,v101); // Read Naturette's positon

   v100-=2; //Set snowball's x from Naturette's x

   v101+=4; //Set Snowball's y when it's on the ground.

   v102=50; //Set snowball's y

   animate.obj(o1); //Snowball view

   set.view(o1,40);
   set.loop(o1,0);
   set.cel(o1,0);
   stop.cycling(o1);

   ignore.objs(o1);// To prevent Snowball to get struck on Naturette

   position.v(o1,v100,v102); // snowball's position

   draw(o1);

   ignore.blocks(o1); // To prevent Snowball to get struck on the blue line priority

   set.priority(o1,15); //The snowball must hide Naturette.

   move.obj.v(o1,v100,v101,1,f100); //That's command make me crazy.

   //move.obj(o1,52,140,4,f100); //move.obj works. You may want to try it first.
   erase(o14);
   erase(o15);
   erase(o16);
   set(f200);
   set(f201);
   set(f202);
  }
 }
}
}
if (isset(f100)){
reset(f100);
start.cycling(o1);
draw(o1);
erase(o0);
shake.screen(2);
end.of.loop(o1,f101);
}
if (isset(f101)){
reset(f101);
v21=6;
print("Ouch!");
call(251); // Ego death logic used. Most of fanmade games, the logic 94 is used for ego death.
}
if (v2 == 2) {
 new.room(41);
}
if (v2 == 3) {
 new.room(54);
}
if (v2 == 4) {
 new.room(39);
}
return();



Robin Gravel
Andrew_Baker Robin, have you tried using move.obj.v(o1,v100,v101,4,f100);?
Try different step sizes.
Robin_Gravel Thanks Andrew. It works. I will put your credit in my game.

Even move.obj.v(o1,v100,v101,2,f100); works but not
move.obj.v(o1,v100,v101,1,f100);.

It's weird.

Robin Gravel


Andrew_Baker Actually, AGISCI Chris Cromer suggested it on the agigames chat board...  So, he gets the credit.
AGI1122 Sorry but it wasn't me who suggested it, it was Nick.
sonneveld yeh sorry, it was me.  I think the problem was that the blue priority line you had is only 1 pixel wide, so when you set it at a step size of 4, it "jumps" over the line.  When it's set to 1, it will go through every single line, and stop at the blue one.

I guess if you're varying the start position, you might want to make sure that a multiple of 4 doesn't reach the blue line.

- Nick
Robin_Gravel
yeh sorry, it was me.