Barrel Bomb -
Buddywarrior
Member Posts: 62
I have the following script on the OnHeartbeat of my barrel object. When the object is already in the area the script counts down and it blows up just fine. However when an NPC places it down, it doesn't count down or explode but it does Destroy itself. What am I missing so the NPC can place it down and it will work correctly?
void explode() { object oTarget; oTarget = OBJECT_SELF; ActionCastSpellAtObject(SPELL_FIREBALL, oTarget, METAMAGIC_ANY, TRUE, 9, PROJECTILE_PATH_TYPE_DEFAULT, TRUE); ActionSpeakString( "*Ka-B0oM!!*", TALKVOLUME_TALK); DestroyObject(oTarget, 0.5); } void main() { int DoOnce = GetLocalInt(OBJECT_SELF, "DoOnce"); if(DoOnce == 1) { return; } if(DoOnce != 1) { SetLocalInt(OBJECT_SELF, "DoOnce", 1); DelayCommand(3.1f, ActionSpeakString( "3", TALKVOLUME_TALK)); DelayCommand(4.2f, ActionSpeakString( "2", TALKVOLUME_TALK)); DelayCommand(5.2f, ActionSpeakString( "1", TALKVOLUME_TALK)); DelayCommand(5.4f, explode()); } }
0
Comments
If that doesn't work, share your code of how the NCP places it.
Bonus: Here's some ticking sounds—if you want.