Jump to content


MoveToObject


  • Please log in to reply
3 replies to this topic

#1 -Domi_S-

-Domi_S-
  • Guest

Posted 24 May 2004 - 10:43 AM

I am trying to do NPC goes away and returns script (a-la Jaheira's jolt for Harpers).

Going away part:

!Global("CoranRomancePath","GLOBAL",7)
Global("CoranMoves","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("CoranRomancePath","GLOBAL",7)
RealSetGlobalTimer("CoranReturn","GLOBAL",20)
TakePartyItem("X#CBABY")
TakePartyItem("X#CBOOK")
TakePartyItem("X#CMILK")
DestroyItem("X#CBABY")
DestroyItem("X#CBOOK")
DestroyItem("X#CMILK")
EscapeAreaMove("FW0103",368,402,2)
END

Works well, Coran goes where he is told to go, but the "move to player part" does not execute. If I go to the Inn, he does inititate the proper dialogue...

IF
Global("CoranMoves","GLOBAL",1)
RealGlobalTimerExpired("CoranReturn","GLOBAL")
Global("CoranBack", "GLOBAL",0)
!See(Player1)
THEN
RESPONSE #100
SetGlobal("CoranMoves","GLOBAL",2)
MoveToObject(Player1)
END

IF
Global("CoranMoves","GLOBAL",2)
Global("CoranBack", "GLOBAL",0)
See(Player1)
THEN
RESPONSE #100
SetGlobal("CoranMoves","GLOBAL",3)
SetGlobal("CoranBack", "GLOBAL",1)
Dialogue(Player1)
END

Can someone give me a tip on what's breaking up the MoveToObject?

#2 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 24 May 2004 - 04:49 PM

I think MoveToObject() will only work within an area. To jump areas I believe you need MoveGlobalObject()

#3 -Ashara-

-Ashara-
  • Guest

Posted 24 May 2004 - 05:55 PM

Thank you Kismet, I will look up this function. :) Or change the text. :D

#4 -Ashara-

-Ashara-
  • Guest

Posted 24 May 2004 - 08:39 PM

Tried

MoveGlobalObject("CORAN",Player1)
in place of MoveToObject

and still no luck :(