Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Neverwinter Nights 1 & 2 Also SoU & HotU Forum
FAQ Calendar Arcade Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 01-23-2007, 03:20 PM   #1
robertthebard
Xanathar Thieves Guild
 

Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
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.
Good Music: Here.
Interesting read, one of my blogs.
robertthebard is offline   Reply With Quote
Old 01-23-2007, 03:57 PM   #2
Legolas
Jack Burton
 

Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
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.
__________________


Say NO to the Trouser Tyranny!
Legolas is offline   Reply With Quote
Old 01-23-2007, 04:54 PM   #3
robertthebard
Xanathar Thieves Guild
 

Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
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.
Good Music: Here.
Interesting read, one of my blogs.
robertthebard is offline   Reply With Quote
Old 01-23-2007, 05:39 PM   #4
robertthebard
Xanathar Thieves Guild
 

Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
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.
Good Music: Here.
Interesting read, one of my blogs.
robertthebard is offline   Reply With Quote
Old 01-23-2007, 06:34 PM   #5
robertthebard
Xanathar Thieves Guild
 

Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
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.
Good Music: Here.
Interesting read, one of my blogs.
robertthebard is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 08:53 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved