Objects won't move

Started by , Sat 20/05/2006 17:10:19

Previous topic - Next topic

m0ds

I'm having an annoying problem with some objects because they won't seem to move. I've used the appropriate code for AGS 2.7:

Quote
object[0].Move(0, 0, eAnywhere, eBlock);
object[1].Move(0, 300, eAnywhere, eBlock);

In my "first time player enters screen" area, but the two objects just stand there, and don't move - blocking the game. If I have it set to eNoBlock, the objects just sit there (even though you can continue playing). Basically, object 0 is meant to move up and off screen, and object 1 move down and off-screen.

Am I missing something really silly here? The only walkable areas on the screen are at a completely different location to any of the x & y's of these two objects. I can't add any more large walkable areas without risking the character to be able to walk in random parts of the screen.

I dunno, I'm stumped! I just wanted it to move directly & off screen.

Any help is appreciated :)

Kweepa

According to the manual:
Code: ags

Object.Move(int x, int y, int speed, optional BlockingStyle, optional WalkWhere);

So it looks like you're missing the speed parameter (and AGS is using eAnywhere as the speed).
Try:
Code: ags

object[0].Move(0, 0, 10, eNoBlock, eAnywhere);
object[1].Move(0, 300, 10, eNoBlock, eAnywhere);


(You should pay more attention to the autocomplete! :=)
Still waiting for Purity of the Surf II

SMF spam blocked by CleanTalk