Skip to content

DoGrenade() Question

I'm just trying to get the grenade animation of the bottle bouncing to it's target. As it is now it just appears to explode out of thin air. All I want is the bouncing grenade animation. Where is it? Anyone know?
code so far:
// Test script (Do Grenade)
    object oUsed6 = GetItemActivated();
    if (GetTag(oUsed6) == "BOB_G")
    {
     object oPC = GetItemActivator();
     location lEnemy = GetItemActivatedTargetLocation();
     AssignCommand(oPC, DoGrenade(d6(1),d4(1), VFX_IMP_FLAME_M, VFX_FNF_FIREBALL, DAMAGE_TYPE_FIRE, RADIUS_SIZE_MEDIUM, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE));
    }
}
Thnks guys, your the best!!!

Comments

  • NeverwinterWightsNeverwinterWights Member Posts: 339
    edited January 2022
    ActionCastFakeSpellAtLocation(SPELL_GRENADE_HOLY, lTarget)

    There are 8 different types of grenade spell constants to pick from.
  • ZephiriusZephirius Member Posts: 411
    edited January 2022
    Thanks for the heads up.
    Got the Fake grenade spell to work but all of the effects fire before the grenade launches. The PC literally fake throws > then the effects and damage apply > then throws the grenade , and it bounces merrily on it's way to a big nothing...?

    Everything is out of sync horribly.

    If anyone can see anything awry with my delays, or anything else that comes to mind - please chime in. :)
    AssignCommand(oPC, ActionCastFakeSpellAtLocation(SPELL_GRENADE_HOLY, GetItemActivatedTargetLocation(), PROJECTILE_PATH_TYPE_DEFAULT));
    DelayCommand(0.3, AssignCommand(oPC, DoGrenade(d6(2),d4(1), VFX_IMP_MIRV_ELECTRIC, VFX_FNF_ELECTRIC_EXPLOSION, DAMAGE_TYPE_POSITIVE, RADIUS_SIZE_MEDIUM, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE)));
    
    DelayCommand(0.3, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectAreaOfEffect(AOE_PER_FOGFIRE), GetSpellTargetLocation(), RoundsToSeconds(5)));
    
    effect eFire = EffectVisualEffect(VFX_IMP_HEAD_FIRE);
    DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, GetItemActivatedTarget()));
    
    effect eBombFX = EffectVisualEffect(VFX_FNF_SOUND_BURST);
    ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBombFX, lLoc);
    
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    Zephirius wrote: »
    Thanks for the heads up.
    Got the Fake grenade spell to work but all of the effects fire before the grenade launches. The PC literally fake throws > then the effects and damage apply > then throws the grenade , and it bounces merrily on it's way to a big nothing...?

    Everything is out of sync horribly.

    If anyone can see anything awry with my delays, or anything else that comes to mind - please chime in. :)
    AssignCommand(oPC, ActionCastFakeSpellAtLocation(SPELL_GRENADE_HOLY, GetItemActivatedTargetLocation(), PROJECTILE_PATH_TYPE_DEFAULT));
    DelayCommand(0.3, AssignCommand(oPC, DoGrenade(d6(2),d4(1), VFX_IMP_MIRV_ELECTRIC, VFX_FNF_ELECTRIC_EXPLOSION, DAMAGE_TYPE_POSITIVE, RADIUS_SIZE_MEDIUM, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE)));
    
    DelayCommand(0.3, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectAreaOfEffect(AOE_PER_FOGFIRE), GetSpellTargetLocation(), RoundsToSeconds(5)));
    
    effect eFire = EffectVisualEffect(VFX_IMP_HEAD_FIRE);
    DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, GetItemActivatedTarget()));
    
    effect eBombFX = EffectVisualEffect(VFX_FNF_SOUND_BURST);
    ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBombFX, lLoc);
    

    Unfortunately casting fake spells still doesn't have a parameter to not do the spell animation. Instead, create an invisible object at the player location, have it cast the fake spell, then destroy the invisible object. You can mess around with your timing from there.
  • ZephiriusZephirius Member Posts: 411
    Zephirius wrote: »
    Thanks for the heads up.
    Got the Fake grenade spell to work but all of the effects fire before the grenade launches. The PC literally fake throws > then the effects and damage apply > then throws the grenade , and it bounces merrily on it's way to a big nothing...?

    Everything is out of sync horribly.

    If anyone can see anything awry with my delays, or anything else that comes to mind - please chime in. :)
    AssignCommand(oPC, ActionCastFakeSpellAtLocation(SPELL_GRENADE_HOLY, GetItemActivatedTargetLocation(), PROJECTILE_PATH_TYPE_DEFAULT));
    DelayCommand(0.3, AssignCommand(oPC, DoGrenade(d6(2),d4(1), VFX_IMP_MIRV_ELECTRIC, VFX_FNF_ELECTRIC_EXPLOSION, DAMAGE_TYPE_POSITIVE, RADIUS_SIZE_MEDIUM, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE)));
    
    DelayCommand(0.3, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectAreaOfEffect(AOE_PER_FOGFIRE), GetSpellTargetLocation(), RoundsToSeconds(5)));
    
    effect eFire = EffectVisualEffect(VFX_IMP_HEAD_FIRE);
    DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, GetItemActivatedTarget()));
    
    effect eBombFX = EffectVisualEffect(VFX_FNF_SOUND_BURST);
    ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBombFX, lLoc);
    

    Unfortunately casting fake spells still doesn't have a parameter to not do the spell animation. Instead, create an invisible object at the player location, have it cast the fake spell, then destroy the invisible object. You can mess around with your timing from there.

    That did the trick! Thank you for the suggestion. :)
Sign In or Register to comment.