![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
#1 |
Xanathar Thieves Guild
![]() Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 62
Posts: 4,537
|
Ok, I'm trying to do a respawn system that sends you someplace else when you die, creates a portal where you go, so you can get back. The respawn script works, but the death script evidently isn't placing the WP where I die for the test.
#include "nw_i0_plot" void main() { object oPC = GetLastPlayerDied(); if (!GetIsPC(oPC)) return; object oTarget; object oSpawn; location lTarget; oTarget = oPC; lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_WAYPOINT, "rb_spawnpoint", lTarget); } It's supposed to just create a waypoint at the spot where I died, but...
__________________
To those we have lost; May your spirits fly free. Interesting read, one of my blogs. |
![]() |
![]() |
![]() |
#2 |
Jack Burton
![]() Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 40
Posts: 5,459
|
I can't say (this part of) the script fails to work for me. It has no trouble spawning waypoints next to characters living or dead.
Make sure the waypoint resref on your palette actually is rb_spawnpoint, that's all I can think of. |
![]() |
![]() |
![]() |
#3 |
Xanathar Thieves Guild
![]() Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 62
Posts: 4,537
|
Hmm, ok, I'll double check all of that.
Edit: Ok, it seems as if the waypoint isn't getting placed, as when I place it manually in the toolset, the portal takes me to it just fine. Back to the drawing board, I may just start over, and be sure I'm not crossing something up. [ 01-23-2007, 05:13 PM: Message edited by: robertthebard ]
__________________
To those we have lost; May your spirits fly free. Interesting read, one of my blogs. |
![]() |
![]() |
![]() |
#4 |
Xanathar Thieves Guild
![]() Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 62
Posts: 4,537
|
void main()
{ object oPC = GetPCSpeaker(); object oTarget; location lTarget; oTarget = GetWaypointByTag("RB_RespawnPoint"); lTarget = GetLocation(oTarget); if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return; //AssignCommand(oPC, ClearAllActions()); AssignCommand(oPC, ActionJumpToLocation(lTarget)); oTarget = oPC; int nInt; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget)); oTarget = GetObjectByTag("respawnportal"); DestroyObject(oTarget, 1.0); } This is supposed to jump me to the waypoint created by the death script. When I manually place the waypoint, it will jump me to it. However, it won't destroy the recall portal made by the respawn script, despite the fact that it's supposed to. Should I add the #include to this as well, which just occured to me... Edit: Ok, the not destroying the portal was easy, typo..was supposed to be RespawnPortal...duh. However, when I comment out the " if (GetAreaFromLocation" line, it plays the animation, destroys the portal, but doesn't teleport me to the waypoint. I am beginning to wonder if the waypoint is destroying itself, as it seems I get an unsummon animation when I arrive at the respawn point, where the portal is created. [ 01-23-2007, 06:03 PM: Message edited by: robertthebard ]
__________________
To those we have lost; May your spirits fly free. Interesting read, one of my blogs. |
![]() |
![]() |
![]() |
#5 |
Xanathar Thieves Guild
![]() Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 62
Posts: 4,537
|
It's all figured out now, I moved the creation of the waypoint to the respawn script, and now all works as it should...was a long walk back to verify the portal being gone, though, let me tell you...Thanks for chiming in, Legolas, I really appreciate it.
__________________
To those we have lost; May your spirits fly free. Interesting read, one of my blogs. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
RE: Paladin AI Script | Dundee Slaytern | Icewind Dale | Heart of Winter | Icewind Dale II Forum | 15 | 12-08-2003 01:08 AM |
Script help | Lord Splynncryth | Dungeon Craft - RPG Game Maker | 2 | 09-15-2002 11:35 PM |
Script | Wedin | Icewind Dale | Heart of Winter | Icewind Dale II Forum | 3 | 04-06-2002 02:14 PM |
Script Questions | kopema | Icewind Dale | Heart of Winter | Icewind Dale II Forum | 11 | 06-10-2001 05:42 AM |
script writing | slackerboy | Baldurs Gate II Archives | 8 | 03-11-2001 10:52 AM |