Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Simple Respawn Script
Author  RiffRaff
Submitted / Updated  06-17-2006 / 11-22-2006
Category  Scripting routines
Expansions  HOTU-1.67
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Spawning
Includes  BioWare Standard
Description
This simple script can be added to any creatures ondeath event and it causes them to automatically respawn after a certain period of time. It removes the need for using encounters for killable NPCs.

Just change the RES_DELAY constant at the top of the script to change the respawn time in seconds.

Files

NameTypeSizeDownloads
rr_dea_respawn.erfrr_dea_respawn.erf
Submitted: 06-17-2006 / Last Updated: 06-17-2006
erf1.88Kb255
Script for NPC respawning
SCORE OUT OF 10
10
3 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (9):

Posted by olcottr at 2010-04-01 05:37:26    Voted 10.00 on 04/01/10
Great alternative to EffectSpawn (which spawns new monsters at point of origin. Can you say zombie horde?

Posted by riffraff at 2006-10-29 07:12:21    
Bobo, you need to put the script on your blueprint and re-place the monster.

If you just put in on the monster as placed it will respawn the blueprint monster and the blueprint doesn't have the special script.
_________________________
My Submissions

Posted by bobo11.5 at 2006-09-22 22:01:10    Voted 10.00 on 09/22/06
I love this script, its like the only one simple enough for the scripting impared, but the creatures you respawn only come back once. Is there a way to make them come back over and over?
_________________________
"Ironfist honor and manhood" "Oh you mean the two smallest things in all of faerun"
...
"Fat bellied little knee high"


Posted by riffraff at 2006-06-26 17:10:20    
Renvaar:

When adding the code to an existing ondeath script, remove the line:

ExecuteScript("x2_def_ondeath", OBJECT_SELF);

It could easily cause a recursive endless loop (aka TMI) and other stuff.
_________________________
My Submissions

Posted by renvaar at 2006-06-25 11:46:05    
It worked but now i also randomly crash while playing...
Also is there a way to make them spawn where they are placed and not where they die, and i placed one and four respawned

Posted by DaNippers at 2006-06-18 22:00:51    Voted 10.00 on 06/18/06
Thank you very much :)
_________________________
"We came, We saw, we kicked .... OH MY GOD! RUN!!!!!"

Posted by riffraff at 2006-06-18 19:28:34    
When adding the code to an existing ondeath script, remove the line:

ExecuteScript("x2_def_ondeath", OBJECT_SELF);

It could easily cause a recursive endless loop (aka TMI).
_________________________
My Submissions

Posted by DaNippers at 2006-06-18 15:10:12    Voted 10.00 on 06/18/06
GAH they don't allow the [code] command, Buggers lol well anyways that's the idea
_________________________
"We came, We saw, we kicked .... OH MY GOD! RUN!!!!!"

Posted by DaNippers at 2006-06-18 15:09:18    Voted 10.00 on 06/18/06
VERY Nice, And it actually worked for me, lol Although now I randomly crash, Could be that I added it to the cnr skinnable creature Here's the code after Adding maybe you can Help me figure if that's where and how to fix???

[code]/////////////////////////////////////////////////////////
//
// Craftable Natural Resources (CNR) by Festyx
//
// Name: cnr_skin_ondeath
//
// Desc: The OnDeath handler for skinnable animals.
//
// Author: David Bobeck 18Feb03
//
/////////////////////////////////////////////////////////
const float RES_DELAY = 120.0f;
#include "cnr_config_inc"
#include "nw_i0_2q4luskan"


void FadeCorpse()
{
object oBones = GetLocalObject(OBJECT_SELF, "CnrCorpseBones");
if (GetIsObjectValid(oBones))
{
DeleteLocalObject(OBJECT_SELF, "CnrCorpseBones");
DestroyObject(oBones);
}
DestroyObject(OBJECT_SELF);
}

void main()
{
string sRes = GetResRef(OBJECT_SELF);
location lLoc = GetLocation(OBJECT_SELF);
AssignCommand(GetModule(), DelayCommand(RES_DELAY, CreateObjectVoid(OBJECT_TYPE_CREATURE, sRes, lLoc)));
ExecuteScript("x2_def_ondeath", OBJECT_SELF);

location locDeath = GetLocation(OBJECT_SELF);
object oCorpse = CreateObject(OBJECT_TYPE_PLACEABLE, "cnrcorpseskin", locDeath, FALSE);
object oBones = CreateObject(OBJECT_TYPE_PLACEABLE, "cnrcorpsebones", locDeath, FALSE);
SetLocalObject(oCorpse, "CnrCorpseBones", oBones);
SetLocalString(oCorpse, "CnrCorpseType", GetTag(OBJECT_SELF));

AssignCommand(oCorpse, DelayCommand(CNR_FLOAT_SKINNABLE_CORPSE_FADE_TIME_SECS, FadeCorpse()));
}[/code]

Any Ideas???
_________________________
"We came, We saw, we kicked .... OH MY GOD! RUN!!!!!"

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 UI


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters