Author Topic: script help  (Read 318 times)

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
script help
« on: July 25, 2011, 10:47:03 pm »


                I have a stone that when activated you can save up to 3 locations and travel back to them .The problem is the scripts are setup to delete the locations after you port to one. It uses the bioware database.If anyone has used this system and can fix it so it doesnt delete the locationsthat would be nice.

Here is the script when using the portal.

void main(){object oPC = GetLastUsedBy();object oCreator = GetLocalObject(OBJECT_SELF, "Creator");location lPC = GetLocation(oPC);location lDestination = GetLocalLocation(OBJECT_SELF, "Destination");effect eTeleport = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); //Effect to use when Teleporting
SetLocalInt(oPC, "Teleported", 1);DelayCommand(30.0, DeleteLocalInt(oPC, "Teleported"));ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eTeleport, lPC); //Apply the teleport effect to the location of the PCDelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lDestination)));
if (oPC == oCreator) DestroyObject(OBJECT_SELF, 3.0);}



I have downloaded  Rune_Gate from here  http://nwvault.ign.c....Detail&id=3198
               
               

               


                     Modifié par Knight_Shield, 25 juillet 2011 - 09:51 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
script help
« Reply #1 on: July 25, 2011, 11:50:57 pm »


               That is not the script that need to be modified.   I am guessing that the script that needs to be modified is most likely in the conversation when you select(ACTION TAKEN SCRIPT) the destnation you want to goto.
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
script help
« Reply #2 on: July 26, 2011, 12:22:12 am »


               Your exactly right Lightfoot8 ....Found it ! lol   where I ( // ) makes it work

//void Reset(object oWaypoint)
//{
//DeleteLocalObject(OBJECT_SELF, "5001");
// DeleteLocalObject(OBJECT_SELF, "5002");
// DeleteLocalObject(OBJECT_SELF, "5003");
// SetCustomToken(5001, "Empty");
// SetCustomToken(5002, "Empty");
// SetCustomToken(5003, "Empty");
// DestroyObject(oWaypoint);
// DelayCommand(3.0, ExecuteScript("rune_resave", OBJECT_SELF));
//}

void OpenPortal(object oPC, object oWaypoint, location lPortal, location lDestination)
{
object oPortal = CreateObject(OBJECT_TYPE_PLACEABLE, "rune_gate", lPortal, FALSE);
DelayCommand(1.0, SetLocalLocation(oPortal, "Destination", lDestination));
PlaySound ("as_mg_telepin1");
DelayCommand(1.0, SetLocalObject(oPortal, "Creator", oPC));
// DelayCommand(3.0, Reset(oWaypoint));
DelayCommand(300.0, DestroyObject(oPortal));
}

void main()
{
object oPC = GetPCSpeaker();
object oWaypoint = GetLocalObject(OBJECT_SELF, "5001");
location lPortal = GetItemActivatedTargetLocation();
location lDestination = GetLocation(oWaypoint);
//effect eEffect = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);



 PlaySound("sco_mehedelec01");



//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, lPortal);
DelayCommand(2.0, OpenPortal(oPC, oWaypoint, lPortal, lDestination));
}
               
               

               


                     Modifié par Knight_Shield, 25 juillet 2011 - 11:23 .