Seamhainn Posted November 5, 2008 Share Posted November 5, 2008 Hello! I want to restore the Echani Mercenary on Manaan. My investigations hint that he can be met in the hotel in Ahto City. So I implement him in the game with the .git file in said module. His dialogue suggests that he can later be met in the Mercenary Enclave again. So, depending on the variable MAN_PLANET_PLOT, the NPC has to vanish from the module he originally was positioned in and reappeare in another module at a certain position (when the PC returns successfully from the Hrakerth Reef). How can I do that? Thanks for any help! Take care Link to comment Share on other sites More sharing options...
zbyl2 Posted November 5, 2008 Share Posted November 5, 2008 This script should go to line, where NPC vanish: void main() { DestroyObject(GetObjectByTag("tag of NPC that should vanish")); } Later, to OnEnter script of module he should re-appear, add this: if(GetGlobalNumber("MAN_PLANET_PLOT")==x) { //Change x into any number CreateObject(OBJECT_TYPE_CREATURE,"resref of NPC", Location(GetWaypointByTag("tag of waypoint")); } Hope it's understandable Link to comment Share on other sites More sharing options...
Seamhainn Posted November 10, 2008 Author Share Posted November 10, 2008 Okay, thanks zbyl2! Nevertheless those scripts must be checked when the PC enters the said modules, including a conditional I guess. Where can I find the OnEnter scripts for manm26aa and manm26ae? Thanks Link to comment Share on other sites More sharing options...
zbyl2 Posted November 10, 2008 Share Posted November 10, 2008 Where can I find the OnEnter scripts for manm26aa and manm26ae? In .are file of module there should be field "OnEnter script" (or something like that, I don't have an access to my computer for now). There's the name of script. If you don't have anything in this field, just make new script and put it name to .are file. If there's something, you have to decompile OnEnter script of module and edit this. Link to comment Share on other sites More sharing options...
Seamhainn Posted November 11, 2008 Author Share Posted November 11, 2008 Okay, I have this OnEnter script: void main() { object oEntering = GetEnteringObject(); object oPC=GetFirstPC(); if (GetIsPC(oEntering)) { if (GetGlobalBoolean("MAN_ECHANIR_DONE")) { vector vPos; float fAngle; vPos.x = 38.00; vPos.y = 5.00; vPos.z = 27.00; fAngle = 0.0; CreateObject(OBJECT_TYPE_CREATURE, "man26_echmerc2", Location(vPos, fAngle)); } ExecuteScript("k_pman_26a_area", OBJECT_SELF); } } Obviously I only want one man26_echmerc2, and so want the script executed only once. Unfortunately I can't set ECHANIR_DONE to FALSE, as it is used elsewhere in the game also. How can I make it that the script is only executed once? Thanks! Link to comment Share on other sites More sharing options...
zbyl2 Posted November 11, 2008 Share Posted November 11, 2008 Never did it before so I can be wrong, but I think you can use GetLocalBoolean function instead. if(GetLocalBoolean(OBJECT_SELF, 10)) { Link to comment Share on other sites More sharing options...
Seamhainn Posted November 11, 2008 Author Share Posted November 11, 2008 Thanks, what is that boolean for or supposed to do? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.