Server Totals
Deglos - (1)
Visimontium - (1)
Le'Or - (0)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Underdark - (0)
Total players: 2
Gallery
  • M'Chek - Azlae vs Nixtixu
    Album name: DM Events
    Uploaded by: Hamlet
    Uploaded: Wed Aug 20, 2014 12:40 am

Links Menu

Exploding Spawns

Moderators: Nighthawk4, Dungeon Masters

Exploding Spawns

PostAuthor: TripleAught » Sat Aug 05, 2006 3:05 am

I pulled something from the NWLexicon, and since I know little about scripting, I thought I'd post here to let the experts handle it.

I want to create spawns that when they are damaged, they explode. Easy enough. But I want the explosion to be damaging to an area around them.
Gurky was mentioning that there is a spawn_explode function that you can use in the DM client, is that something that could be built into a script?

Here's what I pulled out of the Lexicon, can someone show me what I would need to add for the damage part. And I don't think that I need the Plot bit, can I remove those pieces?

Code: Select all
// Kill a creature in an explosion of gore.
//
// oVictim is the target of the effect
// If bAffectPlot is TRUE, then the script will work on
// creatures with the plot flag set.
//
// Written by Celowin
// Last Updated: 7/23/02
//
void BloodExplode(object oVictim = OBJECT_SELF, int bAffectPlot = FALSE)
{
  if ((!GetPlotFlag(oVictim) || bAffectPlot) && (GetObjectType(oVictim) == OBJECT_TYPE_CREATURE))
  // If the victim doesn't have the plot flag, it works
  // If bAffectPlot is TRUE, it works
  // Only works on creatures
  {
    // Create the effects:  the explosion, and the death
    effect eBloodShower = EffectVisualEffect(VFX_COM_CHUNK_RED_LARGE);
    effect eDeath = EffectDeath();
    // Make sure the victim can be killed
    SetPlotFlag(oVictim, FALSE);
    // Apply the effects
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oVictim);
    ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBloodShower, GetLocation(oVictim));
  }
}
The Texas Meet 2007 wrote:Come over here and take off your pants.

The Texas Meet 2010 wrote:I can't unhear that.
User avatar
TripleAught
World Leader
World Leader
 
Posts: 6127
Joined: Wed Sep 08, 2004 11:48 am
Location: AUSTIN!

PostAuthor: dougnoel » Sat Aug 05, 2006 3:55 am

You can remove the plot bit. I would suggest just yanking the fireball spell code. You can change the damage type to whatever you want (divine if you want it to bypass all DR) and you're all set.

dougnoel
Team Member; Retired with Honors
 
Posts: 6265
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)

PostAuthor: chilingsworth » Sat Aug 05, 2006 4:07 am

umm... :shock:

*cringes in terror and is glad he tends to avoid combat*


*edit* serriously, this sounds like s cool idea, even if it is ebul. :)
The sweetest obession
to keep me awake
sleep loss entailed
by the love that we make.

Don't spawn me a lover
Don't spam me with choclates
just return my affections
or just set me free

pstanton wrote:I think it is time to stop bickering like children and find a way to release Gurth from the Seal in such a way that people like Grag don't have collective heart failure.

Player of Grag Tharashk
User avatar
chilingsworth
Scholar
 
Posts: 1459
Joined: Wed Jun 08, 2005 5:24 pm
Location: Who wants to know? (GMT -4)

PostAuthor: jordenk » Sat Aug 05, 2006 5:41 am

i was wondering how long itd take for this to come up.... haha guess ill just have to watch out for fat montsers....

jordenk
Scholar of Fools
 
Posts: 466
Joined: Wed May 11, 2005 5:01 am

PostAuthor: downsystem » Sun Aug 06, 2006 4:27 pm

There is a demon or devil on the elysia server that explodes when you kill it, or at least their was at one time. Its been some time since i went to fight it.
User avatar
downsystem
Apprentice Scholar
 
Posts: 656
Joined: Wed Dec 29, 2004 1:16 pm
Location: mt. pleasant, michigan

PostAuthor: Demonseed » Sun Aug 06, 2006 5:58 pm

downsystem wrote:There is a demon or devil on the elysia server that explodes when you kill it, or at least their was at one time. Its been some time since i went to fight it.


That would be a Balor. They all explode when they die
Kard Fynolds, Warrior of Dru'El
Zero Wefer, Sereg'Wethrin Assassin-in-training
User avatar
Demonseed
Apprentice Scholar
 
Posts: 756
Joined: Tue Mar 29, 2005 2:37 pm
Location: the dank, dark underbelly of Brissle

PostAuthor: Darkfire » Sun Aug 06, 2006 6:10 pm

on death epic hell ball :D

Thats one hell of an explosion :P :twisted:
CoEMF :devil: :feuer:
WrathOG777: This is a roleplaying game. There is no such thing as winning or losing. Only playing.
Player of Dameon Nepirtas
User avatar
Darkfire
Major DM
Major DM
 
Posts: 13684
Images: 3
Joined: Sat Feb 12, 2005 4:50 pm
Location: Missouri
Timezone: CST (-5 GMT)

PostAuthor: PsiOmega » Sun Aug 06, 2006 6:10 pm

It's all in the Balor (Lords) OnDead script named nw_s3_balordeth.nss.

The comments mentions cleaning un-droppable items, variables, etc. so I think it's worth a look.
User avatar
PsiOmega
CCC
CCC
 
Posts: 4901
Joined: Tue Jun 08, 2004 4:55 pm
Location: Sweden
Timezone: GMT+1/+2 (DST)


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot], Gorgon, slow feet