Initial commit. Updated release archive.
This commit is contained in:
28
_module/nss/wg_death.nss
Normal file
28
_module/nss/wg_death.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
/// /// /// /// /// /// /// /// /// /// /// ///
|
||||
/// wg_used
|
||||
/// OnDeath script for witchgrass placeable.
|
||||
/// If fire destroyed the plant, it burns.
|
||||
///
|
||||
/// Created by Gilgon Avalrock
|
||||
/// /// /// /// /// /// /// /// /// /// /// ///
|
||||
#include "lib_witchgrass"
|
||||
void main()
|
||||
{
|
||||
//check for fire damage
|
||||
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE)>0){
|
||||
//create smoke effects
|
||||
GenerateSmoke(OBJECT_SELF);
|
||||
object Smoke = CreateObject(OBJECT_TYPE_PLACEABLE,"plc_dustplume", GetLocation(OBJECT_SELF));
|
||||
DestroyObject(Smoke,6.f);
|
||||
int i=1;
|
||||
//get every creature within 10 feet high.
|
||||
object oCreature = GetNearestObject( OBJECT_TYPE_CREATURE, OBJECT_SELF, i );
|
||||
while( oCreature != OBJECT_INVALID && GetDistanceToObject( oCreature ) <= 10.f ) {
|
||||
GetHigh(oCreature);
|
||||
i++;
|
||||
oCreature = GetNearestObject( OBJECT_TYPE_CREATURE, OBJECT_SELF, i );
|
||||
}
|
||||
//nothing survives the fire...
|
||||
DestroyInventory(OBJECT_SELF);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user