Destroy Placeable Animation?
Zephirius
Member Posts: 419
How do you get a placeable to "explode", when a spell is cast at it?
I tried a search with no luck. I didn't see anything useful with the lexicon either baring the code above...
The only thing that works with this script is the spell (chain lightning). No exploding placeables???
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int nOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (nOnce == TRUE)
{
return;
}
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
object oCaster;
object oDoor;
object oCandleabra;
object oBed;
oCaster = GetObjectByTag("LIGHTNING_001");
oDoor = GetObjectByTag("ALTAR_DOOR");
oCandleabra = GetObjectByTag("CANDLEABRA");
oBed = GetObjectByTag("BED");
AssignCommand(oCaster, ActionCastSpellAtObject(SPELL_CHAIN_LIGHTNING, oBed,
METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
DoPlaceableObjectAction(oCandleabra, PLACEABLE_ACTION_BASH);
DelayCommand(1.5, DoPlaceableObjectAction(oBed, PLACEABLE_ACTION_BASH));
DelayCommand(2.0, AssignCommand(oDoor, ActionPlayAnimation(ANIMATION_DOOR_DESTROY)));
}
I tried a search with no luck. I didn't see anything useful with the lexicon either baring the code above...
The only thing that works with this script is the spell (chain lightning). No exploding placeables???
0
Comments
TR
TR
BTW, Have you got the scripting FAQs (Frequently Asked Questions, with answers) yet?
TR
I used to DM a module which had a few decorative (and immortal) chickens near the starting point. The first thing many new players would do is go and attack the chickens. It was great fun to DM-invisibly set a few epic sonic traps around the chickens.