object moving problem

TomB Hi,

I have a problem moving objects. When I want to move an object (using either move.obj (mov.obj.v) or set.dir commands), it only moves one pixel, and then stops. ???

here's my code:

[font=courier]
animate.obj(alien2);
load.view(8);
set.view(alien2,8);
position(alien2,15,80);
release.loop(alien2);
stop.cycling(alien2);
draw(alien2);

if (f42){
v28 = 3;
set.dir(alien2,v28);
normal.motion(alien2);
print("Then, another man walks on the stage.");
reset(f42);
}
[/font]

Cycling objects won't work either!
What am I doing wrong here??

Pleeeese help me. I've been working on this problem for almost a week now!

PS Moving the ego by changing v6 works fine.
Eigen Try using reset(f42); after if (f42){


-Eigen
TomB nope. Didn't work
Kon-Tiki If you didn't say cycling objects didn't work, I'd say you missed start.cycling(alien2) (or start.cycle, always confuse them) I still think that's the problem though.

Maybe a little help: does it display the print-message?

-Kon-Tiki-
Joel Is this code:


animate.obj(alien2);
load.view(8);
set.view(alien2,8);
position(alien2,15,80);
release.loop(alien2);
stop.cycling(alien2);
draw(alien2);


inside of your new room section? If not, then it will get executed every interpreter cycle and the position of your character will continually be reset to (15, 80). If you do this:


if (new_room)
{
// other room initialization stuff here
animate.obj(alien2);
load.view(8);
set.view(alien2,8);
position(alien2,15,80);
release.loop(alien2);
// stop.cycling doesn't belong here -- your
// character will move without looping, giving
// an "ice skating" movement
// stop.cycling(alien2);
draw(alien2);
}

if (f42){
v28 = 3;
set.dir(alien2,v28);
normal.motion(alien2);
print("Then, another man walks on the stage.");
reset(f42);
}


it should work.
Joel actually, if I understand the intent of your code correctly, then the stop.cycling command is fine there, but inside of your if (f42) block, you should also issue the start.cycling command.

one more correction -- that code doesn't necessarily have to be in the new room block, but it should be inside an if statement of some sort so that it doesn't keep getting executed
Andrew_Baker newroom block is best if it only needs to be initialized once.
TomB Hey.. wait a sec.. this might be something!

I'm gonna try this
TomB Whohoo! It worked! :)

Thanks guys.

He was iceskating BTW, but I soon fixed that (forgot to start the cycling).
Joel
Andrew_Baker wrote:

newroom block is best if it only needs to be initialized once.


I made the point because it sounded like this was a timed entrance, in which case putting the initialization in the new room block may not have been desirable. Of course, I guess as long as the draw command is not issued the rest could still be in the new room block.