Exploding Spawns

Moderator: Event DM

Post Reply
User avatar
TripleAught
Team Member; Retired with Honors
Posts: 6145
Joined: Wed Sep 08, 2004 11:48 am
Location: AUSTIN!
Contact:

Exploding Spawns

Post by 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.
dougnoel
Team Member; Retired with Honors
Posts: 6261
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)
Contact:

Post by 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.
User avatar
chilingsworth
Scholar
Posts: 1459
Joined: Wed Jun 08, 2005 5:24 pm
Location: Who wants to know? (GMT -4)

Post by 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
jordenk
Scholar of Fools
Posts: 465
Joined: Wed May 11, 2005 5:01 am

Post by 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....
downsystem
Apprentice Scholar
Posts: 858
Joined: Wed Dec 29, 2004 1:16 pm
Timezone: -5
Location: Mt. Pleasant, Michigan
Contact:

Post by 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
Demonseed
Apprentice Scholar
Posts: 765
Joined: Tue Mar 29, 2005 2:37 pm
Location: the dank, dark underbelly of Brissle

Post by 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
Darkfire
Demigod of Posts
Posts: 16130
Joined: Sat Feb 12, 2005 4:50 pm
Timezone: CST (-5 GMT)
Location: Missouri
Contact:

Post by 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, Nel'Cial, and Pickle Mistbreeze
User avatar
PsiOmega
Team Member; Retired with Honors
Posts: 4886
Joined: Tue Jun 08, 2004 4:55 pm
Timezone: GMT+1/+2 (DST)
Location: Sweden

Post by 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.
Post Reply