Author Topic: What script needs to be in OnPlayerDeath for a recall item to work?  (Read 332 times)

Legacy_UnrealJedi

  • Full Member
  • ***
  • Posts: 226
  • Karma: +0/-0


               I currently have a script named "69_o0_death" as the OnPlayerDeath script (full script below). I cannot remember where I got this script from. All of a sudden the PC is not transported to the temple when he/she does. The game waits until they are at -10 hit points and then the GUI comes up that only allows the reloading of a game or respawning. It's been a long time since I played the OC. Didn't the Stone of Recall transport the PC to the nearest Temple when he/she died? Or am I imagining things?
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
What script needs to be in OnPlayerDeath for a recall item to work?
« Reply #1 on: June 28, 2012, 01:43:55 pm »


               Stone of Recall is a
Unique Power Self item

It returns you to the temple/respawn location when it is used -
But it requires a certain tagged waypoint to be present.

If it isnt working, then either the tag of the recall stone has changed, and isnt matching the script anymore, or
the tagged waypoint isnt present.


As far as respawn systems go

PopUpDeathGUIPanel(
    object oPC,
    int bRespawnButtonEnabled = TRUE,
    int bWaitForHelpButtonEnabled = TRUE,
    int nHelpStringReference = 0,
    string sHelpString = ""
);
This needs to be used in the onDeath event for your module.
Set the respawn button to be TRUE,

then inside the onRespawn event on your module, you put in the logic for determining where to portal the player to.