Can't talk to objects

Started by manny.p, Wed 15/06/2005 12:16:32

Previous topic - Next topic

manny.p

Hi i'm using the MI2 template, i've basically been learning most of the script stuff by looking through it and tutorials, but i'm now stuck.

The command "give" or "talk to" doesn't reconise the object, only all the other commnds do.

for eg. "Pickup Banana" // This one does display the object when its over it
           "Talkto              " // This one doesn't display the object when its over it

Any help?

You might notice in the script that the phrase i want to use is "It is impossible to strike up an intelligent conversation with an inanimate object"

-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------

Here's the script so far:

#sectionend dialog_request  // DO NOT EDIT OR REMOVE THIS LINE


function unhandled_event(int xxx, int yyy){/////////////////////////////Unhandled Event//////////////Unhandled Event
  int type=GSloctype;
  string locationname,usedinvname;
  StrCopy(locationname,GSlocname);
  RemoveExtension(locationname);
  if (GetInvAt(mouse.x,mouse.y)>=0) type=4;
  if (Tmode[GSusedmode].AGSmode==4){
     GetInvName(character[GetPlayerCharacter()].activeinv ,usedinvname);
     RemoveExtension(usedinvname);
    if (type>0) type+=4;
  }
  if (Tmode[GSusedmode].AGSmode==9 && (ALWAYS_GO_TO_HOTSPOTS==0 || ExtensionEx(2,GSlocname)=='d') )
  ProcessClick(mouse.x,mouse.y,MODE_WALK);
  else if (Tmode[GSusedmode].AGSmode!=9 && type!=0 && IsGUIOn(MAPS)==0){

//Check modes with: if(UsedMode(MODE)), check types with: if(type==#). types:
// 1   a hotspot
// 2   a character
// 3   an object
// 4   an inventory item.
// 5   inv. item on hotspot
// 6   inv. item on character
// 7   inv. item on object
// 8   inv. item on inv. item
//
// You have the string "locationname" that is the name of
// what you clicked on, and the string "usedinvname" that is
// the name of the item that was used on where you clicked (only for types 5,6,7,8)
/////////////////////////////////////////////////////////////////

// REPLACE THESE SAMPLE INTERACTIONS WITH YOURS:

    if (UsedMode(USE)){
      if (type>=5) Display("That won't do any good");// if tried to use an inventory item with something
      else Display("I can't use that until i achieve great skill and dexterity"); // if tried to use something else (like a hotspot or object)
    }
    else if (UsedMode(LOOK)){
      if (type!=2) Display("Its a %s", locationname);//if its not a character
      if (type!=3) Display("It is impossible to strike up an intelligent conversation with an inanimate object");     
    }
    else if (UsedMode(TALK)){
      if (type==2) Display("I don't want to talk to %s", locationname); //if its a character
      else Display("It's %s",locationname);
    }
    else if (UsedMode(GIVE)) Display("I'd rather keep it");
    else if (UsedMode(PICKUP)) Display("I can't pick that up");
    else if (UsedMode(OPEN)) Display("I can't open that");
    else if (UsedMode(CLOSE)) Display("I can't close that");
    else if (UsedMode(PUSH)) Display("I can't push that");
    else if (UsedMode(PULL)) Display("I can't pull that");


////////////////////////////////////////////////////
  }
}
 
function Unhandled(){
  unhandled_event(0,0);
}


-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------

I don't now whether its this, or under mouse click, but please help.

Thnx in advance from your ever ambitious n00b.

manny.p

Does any one know how i can talk to objects, so i can say something like "i can't talk to that".

like i said before, when you choose talkto, then try to choose an object, it doesn't appear in the command window ie. Talkto banana<< doesn't appear

Sektor 13

try to use Lucas Arts GUI style tmeplate, you have a lot of command (push,pull,talk to..) there and they work nicely.

manny.p

thats what i am using, but it won't let me use talkto with any hotspots, objects, or inventory for a general response like "i can't talk to that".

I don't know where in the MI2 template global code which stops or lets it do that.

thnx for the suggestion, but anyone else know?

SMF spam blocked by CleanTalk