2024-06-20 15:47:42 -04:00

28 lines
1000 B
Plaintext

/// /// /// /// /// /// /// /// /// /// /// ///
/// wg_damage
/// OnDamaged script for witchgrass placeable.
/// If witchgrass is damaged by fire, it will burn.
///
/// Created by Gilgon Avalrock
/// /// /// /// /// /// /// /// /// /// /// ///
#include "lib_witchgrass"
void main()
{
//check for fire damage
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE)>0){
//create fire and smoke effects
SetOnFire( OBJECT_SELF );
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 );
}
}
}