Skip to content

Make a summon count as a companion

Evenin folks, if someone might be able to assist id greatly appreciate it. I was doin some digging and ive read in order for the above to work you can have the summon count as dominated, or as a henchmen and no matter what i seem to try it doesnt seem to be working. Im attempting to alter the Epic Dragon knight spell to summon in seperate from normal summons.

int nDuration = 20;
object oPC = GetLastSpellCaster();
object oDragon = GetNearestObjectByTag( "epicdragonmount", oPC, 1);
effect eSummon;
effect eVis = EffectVisualEffect(460);
effect eDom = EffectCutsceneDominated();
eSummon = EffectSummonCreature("epicdragonmount",481,0.0f,TRUE);

// * make it so dragon cannot be dispelled
eSummon = ExtraordinaryEffect(eSummon);
//Apply the summon visual and summon the dragon
effect eLink = EffectLinkEffects(eSummon, eDom);

ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eLink,GetSpellTargetLocation(), RoundsToSeconds(nDuration));
// ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDom, oDragon, 0.0f);

DelayCommand(1.3f,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eDom,GetSpellTargetLocation(), 0.0f));

DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis,GetSpellTargetLocation()));

im trying to apply a Dominate to the creature when its spawned in but it isnt dominated and merely just spawns in. Conversely using

AddHenchman(oPC, oDragon);

instead also does the same thing. Any help is appreciated, thanks yall! Im sure its something simple but its kicking my butt atm.

Comments

  • TerrorbleTerrorble Member Posts: 169
    I haven't done any scripting for a while so I hope I'm not leading you astray, but a few things:

    int nDuration = 20;
    object oPC = GetLastSpellCaster();


    /*
    Right here, you are searching for a nearest object that actually isn't created yet. So any effects you try to add to oDragon will fail
    */
    object oDragon = GetNearestObjectByTag( "epicdragonmount", oPC, 1);

    /*
    If you use EffectSummonCreature() it will act like any other summon and will unsummon other summons when you do.
    I think what you want is oDragon = CreateObject();
    */
    effect eSummon;
    effect eVis = EffectVisualEffect(460);

    /*
    EffectCutsceneDominated() is different than EffectDominated(). If you look at the spell script for Dominate Monster (nw_s0_dommon) you can see how EffectDominate() is linked with mind-affecting and cessation vfx and applied to the target.
    I suppose you could apply EffectDominate() after creating the dragon to make it your pet. The dragon won't unsummon at the end of the duration like a regular summon would, though.
    */

    effect eDom = EffectCutsceneDominated();
    eSummon = EffectSummonCreature("epicdragonmount",481,0.0f,TRUE);

    // * make it so dragon cannot be dispelled
    eSummon = ExtraordinaryEffect(eSummon);
    //Apply the summon visual and summon the dragon
    effect eLink = EffectLinkEffects(eSummon, eDom);

    ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eLink,GetSpellTargetLocation(), RoundsToSeconds(nDuration));
    // ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDom, oDragon, 0.0f);

    DelayCommand(1.3f,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eDom,GetSpellTargetLocation(), 0.0f));

    DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis,GetSpellTargetLocation()));

    im trying to apply a Dominate to the creature when its spawned in but it isnt dominated and merely just spawns in. Conversely using

    /*
    I think adding the henchman is the easiest approach and what you wrote below would work, but this issue here is that oDragon was assigned to something that wasn't created yet.
    I have a script where you make a donation to the temple in exchange for the services of one of their people. Here's a snippet:

    object oHench = CreateObject(OBJECT_TYPE_CREATURE,"combatpriest",GetLocation(o),FALSE,"HAMESCHHENCHMAN");
    DelayCommand(3.0,AddHenchman(o,oHench));

    The DelayCommand() runs after everything else in the script allowing for the combat priest to be created first.

    If you add it as a henchman, you'll have to setup some way to unsummon it at the end of the duration. Otherwise, I think it will just stay as a henchman.
    */

    AddHenchman(oPC, oDragon);

  • NightbladeCHNightbladeCH Member Posts: 10
    Thanks chief, i ended up getting it worked out. I used a seperate script entirely that allows for more summoned creatures and just added it as an include to this script. But you were indeed correct, i was attempting to apply an effect to a creature that wasnt spawned in yet. Thanks for your help bud!
Sign In or Register to comment.