Author Topic: OnRespawn issues  (Read 390 times)

Legacy_placidjw

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
OnRespawn issues
« on: March 05, 2011, 06:35:24 pm »


               Hi all, I recently imported Shaylan's subrace system into my module, and ever since my onrespawn script appears to be broken. I can't see why as there doesn't appear to be anything preventing it from working, and everything works apart from the part that teleports you to an afterlife...

Code as follows:

void main()

{
   object lDest;
   object oRespawner = GetLastRespawnButtonPresser();
   object oItemToTake;
   oItemToTake = GetItemPossessedBy(oRespawner, "Death");
   if(GetIsObjectValid(oItemToTake) != 0)
       DestroyObject(oItemToTake);

  if (GetAlignmentGoodEvil(oRespawner)==ALIGNMENT_GOOD)
  lDest = GetWaypointByTag("good_death");
  else if (GetAlignmentGoodEvil(oRespawner)==ALIGNMENT_NEUTRAL)
  lDest = GetWaypointByTag("neutral_death");
  else if (GetAlignmentGoodEvil(oRespawner)==ALIGNMENT_EVIL)
  lDest = GetWaypointByTag("evil_death");
  else lDest = GetWaypointByTag("neutral_death");
  effect eGhost = EffectVisualEffect(VFX_DUR_ETHEREAL_VISAGE);
  AssignCommand(oRespawner,ActionJumpToObject(lDest));
  ExecuteScript("deathpenalty",oRespawner);
  ApplyEffectToObject(DURATION_TYPE_INSTANT,eGhost,oRespawner);
  ExportSingleCharacter(oRespawner);

}
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
OnRespawn issues
« Reply #1 on: March 05, 2011, 06:40:50 pm »


               Do you have the waypoint destinations included in your module, and are the PC's getting the Death item, presumably ondeath?
               
               

               
            

Legacy_placidjw

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
OnRespawn issues
« Reply #2 on: March 05, 2011, 07:06:58 pm »


               The waypoints are included in the three afterlife's. As you say the PC's receives the death item when they die, however its only use is to prevent them logging out/in without going through the respawn cycle. This very script worked precisely as intended before I imported Shayan's subrace mod. I know that the subrace system has its own listing for death rules in its constant/include file, however since there are no calls to any subrace related script either on death or respawn I am utterly clueless why its suddenly broken. Any suggestions very welcome '<img'>
               
               

               
            

Legacy_placidjw

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
OnRespawn issues
« Reply #3 on: March 06, 2011, 04:16:48 pm »


               I managed to fix this issue via adding a Delaycommand before the teleport to the afterlife and seems to work well. My issue now is that I can't work out how to prune the conversation for the subrace wand (http://nwvault.ign.c....Detail&id=3577) to be something players can use to change only their subrace (via speaking to an npc). Currently its designed for DM's and gives you options to reboot the server etc. Its source conversation has an include of 3000 lines though so I'm almost sure if I tinker with it, breakage of the entire system will be soon to follow..

Has anyone else had a similar issue/ worked out a way to easily add an npc for the PC to change their subrace with?

Thanks again,
               
               

               
            

Legacy_placidjw

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
OnRespawn issues
« Reply #4 on: March 06, 2011, 04:17:53 pm »


               "Sorry repeated post glitch*
               
               

               


                     Modifié par placidjw, 06 mars 2011 - 04:19 .
                     
                  


            

Legacy_placidjw

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
OnRespawn issues
« Reply #5 on: March 06, 2011, 04:18:29 pm »


               "Sorry repeated post glitch*
               
               

               


                     Modifié par placidjw, 06 mars 2011 - 04:19 .