Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - demophobie

#1
Advanced Technical Forum / Character.Walk
Sun 07/10/2007 13:36:27
Hi!

I have a problem using Character.Walk.
What i want is (Lucas-Style), that my character automatically walks to where i clicked. And when he arrived his destination, then he for example says something.

I tried the following:

function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
  {
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
    {
    }
  else if (button == eMouseLeft)
    {
    character[MARTY].Walk(mouse.x, mouse.y, eBlock);
    ProcessClick(mouse.x,mouse.y, mouse.Mode);
    mouse.Mode = 0;
    }
}

That works, but in the time he walks i'm unable to give him/her a new command.
There is a option with "eNoBlock" - i thought that would help me - but when i use eNoBlock he doesnt walk anymore.

What did i wrong?

Thanks for your help :-)
#2
Hi !

I could not find a workaround for following problem:
Here a part of my code:

function unhandled_event (int what, int type)
{
 
  if (what == 1)
    {
    if (type == 1) Display("Ich sehe nichts Besonderes.");
    else if (type == 2) Display("Das kann ich nicht benutzen.");
    else if (type == 3) Display("Das funktioniert so nicht.");
    else if (type == 4) Display("Es antwortet nicht.");
    else if (type == 7) Display("Ich kann das nicht nehmen.");
    else if (type == 8) Display("Ich kann das nicht bewegen.");
    else if (type == 9) Display("Das kann ich nicht oeffnen.");
    }
}

Now i want to add a message like this for my cursor 10.
But the manual says:

WHAT TYPE Description
1    1   Look at hotspot
1    2   Interact with hotspot
1    3   Use inventory on hotspot
1    4   Talk to hotspot
1    7   Pick up hotspot
1    8   Cursor Mode 8 on hotspot
1    9   Cursor Mode 9 on hotspot

a "Cursor Mode 10 on hotspot" cant be supported?
i tried if type = 10, but that didnt work.
Does anyone have an idea!?

thanks for the help!

Patrick
#3
hi ppl!

I need help. I checked the Manual, but i could not find the reason for the error message:
"Null pointer referenced" "run_text_script1:error -6 running function repeatedly_execute"
here my script:

function repeatedly_execute()
  {
  string console, buffer;
  int cur_mode,  mode;
  mode = GetGlobalInt(299);
  cur_mode = GetCursorMode();
  StrCopy (console, "");
 
  if (cur_mode == 0) StrCat(console,"Gehe zu ");
  else if (cur_mode == 1) StrCat (console, "Schau an ");
  else if (cur_mode == 2 && cMarty.ActiveInventory.Name != null) {
    StrCat(console, "Gib ");
    StrCat(console, cMarty.ActiveInventory.Name);
    StrCat(console, " an ");
  }


  GetLocationName(mouse.x, mouse.y, buffer);
   StrCat(console, buffer);
   SetLabelText (0, 0, console);
   
    }

The error appears, when i click on button 2.

I'm a newbie. Plz dont be too hard to me ;)
SMF spam blocked by CleanTalk