Beginner's Help: Basic movement

Started by jakmagi, Sun 28/11/2010 13:12:11

Previous topic - Next topic

jakmagi

Hello, I'm new to programming and stuff. As in very, very new..
Anyways, I currently have trouble moving the player character. I have already added the view loops.
And ave looked through a few example for the event scripts..
I can make the player character say thing...even when clicking onto hotspots, yet I still can't make him to the desired location in a room. Here's a snippet:

function hHotspot1_AnyClick()
{
   csomeGuy.Walk(272, 226, eBlock);

Even checked my walkable path. Checked examples scripts for both global and room event..
Though I'm, still not sure on how this works:

else if (button == eMouseLeft)
  {
    ProcessClick(mouse.x,mouse.y, mouse.Mode);
   
  }
  else // right-click, so cycle cursor
  {   
    mouse.SelectNextMode();
  }

Did I still miss anything?

jakmagi

By the way, my other question is whether the player.x,y position is set on as the sprite's  top-left corner or someplace else?

Khris

If you imported your own background its likely that your walkable areas got erased. (Note "areas", not "paths"; in case you have drawn lines for you character to move on, forget that and basically fill the ground.)

Regarding your second post (please use the Modify link at your first post instead of doubleposting), the current sprite's bottom center is placed at the character's coordinates.

Just to make sure, did you find the tutorial in the helpfile? Just double-click ags-help.chm in the main directory or press F1 in the editor. The tutorial explains all this in great detail.

SMF spam blocked by CleanTalk