Command Walk without eBlock no move the char (SOLVED) - With other problem!

Started by Nahuel, Wed 12/08/2009 19:02:11

Previous topic - Next topic

Nahuel

Quote from: Mr Matti on Fri 14/08/2009 14:58:51
Quote from: peillat.nahuel on Fri 14/08/2009 14:03:18
KhrisMUC doesn't return to eModeWalkto!!  :'(  I 'm fried!! I still working on!!

Thanks!!

Nahuel.

You're fried just because Khris doesn't return to eModeWalkto?  ;D

No, seriously, KhrisMUCs script doesn't change the cursor, but lets the character walk. Try this instead:

Code: ags

  else if (button == eMouseLeft) {
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
      mouse.Mode = eModeWalkto;
      ProcessClick(mouse.x, mouse.y, eModeWalkto);
    else ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }


I guess this is what you sere looking for.

Jejeje fried becouse I coudn't make this function! It's unbelievable ! jejejeje.

by the way..  := the script don't work!  :o

Thanks Mr Matti!!

Nahuel.
Life isn't a game. Let's develop a life-like-game.

Matti


Nahuel

Quote from: Mr Matti on Fri 14/08/2009 15:21:28
Why doesn't the script work? What exactly happens?

GlobalScript.asc(93): Error (line 93): PE04: parse error at 'else'
Code: ags

function on_mouse_click(MouseButton button)
{
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
  {
  }
    else if (button == eMouseLeft) {
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
      mouse.Mode = eModeIra;
      ProcessClick(mouse.x, mouse.y, eModeIra);
    else ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
  else if (button == eMouseRight)
  {
    ProcessClick(mouse.x, mouse.y, eModeMirar);
  }
}


and I try this
Code: ags

function on_mouse_click(MouseButton button)
{
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
  {
  }
  else if (button == eMouseLeft) {
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
      mouse.Mode = eModeIra;
      ProcessClick(mouse.x, mouse.y, eModeIra);
    }
    else ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
  else if (button == eMouseRight)
  {
    ProcessClick(mouse.x, mouse.y, eModeMirar);
  }
}


and this
Code: ags

function on_mouse_click(MouseButton button)
{
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
  {
  }
  else if (button == eMouseLeft) {
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
      mouse.Mode = eModeIra;
      ProcessClick(mouse.x, mouse.y, eModeIra);
    }
    else ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
}

And the mouse.Mode remains the action I have and doesn't return to Walkto  :(
Life isn't a game. Let's develop a life-like-game.

Matti

You forgot a closing bracket, it should look like this:

Code: ags

function on_mouse_click(MouseButton button)
{
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
  {
  }
  else if (button == eMouseLeft) {
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
      mouse.Mode = eModeIra;
      ProcessClick(mouse.x, mouse.y, eModeIra);
    }                                                            // <-- this bracket was missing
    else ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
  else if (button == eMouseRight)
  {
    ProcessClick(mouse.x, mouse.y, eModeMirar);
  }
}



EDIT: Sorry, in your second code, the bracket is there. I've no clue why it doesn't work, are you sure you have set the walkable areas right?

Nahuel

Mr Matti the function is not working.

I make a function ModeStandard()
{
       mouse.Mode = eModeIra;
}

And I call when the script finish.

I think I will delete all the scripts and make from beggining!  :'(

Have anybody any script like LucasArt Stile? My Script is a disaster!
I only want make an interface like LucasArts.

Features:

Click on object or hotspot, make action (possible cancel with click on other place) you know

Thanks!

By the way
If anybody wants my game to test why doesn't work I give you! jeje :=

Guys thanks for help me!
Life isn't a game. Let's develop a life-like-game.

Matti


Nahuel

Quote from: Mr Matti on Fri 14/08/2009 16:36:49
Yeah, upload it so we can have a look..

Ok I will upload in a minutes. Thanks for your efforts!

HAVE PROBLEM!! I can't upload it at work! In a couple of hours I will upload the file.

Code: ags

Pass:
ThanksForHelpMe1


Nahuel.
Life isn't a game. Let's develop a life-like-game.

SMF spam blocked by CleanTalk