I am running into a problem. To test how I think it should be, from what you are saying Lightfoot, I made a new module. The door has your script in it's OnAreaTransitionClick:
#include "X0_I0_TRANSPORT"
void main()
{
object oClicker = GetClickingObject();
object oTarget = GetLocalObject(OBJECT_SELF,"TRANS_TARGET");
TransportToWaypoint(oClicker,oTarget);
}
And this script is in the Actions Taken for the conversation:
void main()
{
// Get the Object for each door.
object oNPCsDoor = GetNearestObject(OBJECT_TYPE_DOOR);
object oDestDoor = GetObjectByTag("RandomDoor5");
//Set oDestDoor as the destnation for oNPC's door.
SetLocalObject ( oNPCsDoor,"TRANS_TARGET",oDestDoor);
// Set oNPC's door as the Destnation for oDestDoor
SetLocalObject ( oDestDoor,"TRANS_TARGET",oNPCsDoor);
}
The conversation has three choices(with the RandomDoor5 changed appropriately in each).
The destination doors ARE made.
The problem I am having is that when I click to open the door, there is NO area transition clickie highlight there. This was one problem I ran into earlier, before I decided to put the solution I had had into the OnOpen script and have it teleport the PC. I believe yours should work, if the area transition highlight shows up on opening the door.
edit-I also tried something else with another door and 3 more areas(all forests). I tried having it randomly select between them(yes I used an if statement for this). I told it to set an int to a die roll result of a d6. If that result is a 1 or a 2, run the scriptlines you have but to a certain forest, or if it is 3 or 4, another forest, else a third.
Modifié par datamaster, 14 mai 2011 - 03:16 .