Jump to content

Want to make a summonable Grizzly. Can't figure out how.


Recommended Posts

Sadly most of these things are hard-coded inside this game. But you can re-create a creature summon with a Scripted Effect spell instead.

 

To minimize save game bloating, it's usually advised to stay away from spawning a new creature every time, but instead the creature exists already as 1 instance with a Persistent Reference inside an inaccessible holding cell, from where it's just "called upon" to you when the spell is cast. And once the spell duration ends, it's sent back to the cell. Additionally, as summons can also die, a short is-alive check and according revival is also scripted into it.

 

Give me a short time to get done with my tasks, and I might be able to come up with a basic example.

Link to comment
Share on other sites

So, let's see.

First we'll need the holding cell. Let's call it "MyHoldingCell" for reference's sake. Into it you place an XMarker and name it "MyHoldingCellMarker".
Into it we put the creature. Make it persistent and give it the Persistent Reference ID "MySummonCreature".

Then you need a spell, with a duration and a Script Effect or Scripted Effect (can't recall what it was named). And I think it should best also be cast on "self".
This will need a "Spell"-type script as well, of course. I can't currently check it out in game or check for errors, so bear with me, if I make any.

scn MyCustomSummonSpellScript
 
Begin ScriptEffectStart
    ;this runs only once when the spell is cast
    If 1 == MySummonCreature.GetDead
        ;it is dead, resurrect it first
        MySummonCreature.Resurrect 0
    EndIf
    MySummonCreature.MoveTo player ;move it to the caster
End
 
Begin ScriptEffectEnd
    ;this runs only once at the point in time when the spell ends
    MySummonCreature.MoveTo MyHoldingCellMarker ;move it back to the holding cell
End


I'm thinking you might also want to add another block, to check for the creature's death and move it back to the holding cell at that point as well.

Begin GameMode
    ;runs once every frame or more regularly, while the spell duration lasts
    If ( 1 == MySummonCreature.GetDead ) && ( MySummonCreature.GetInSameCell player )
        MySummonCreature.MoveTo MyHoldingCellMarker
    EndIf
End


That should basically do the trick already.
You might think about adding a frame-counter into the last GameMode block, as it definitely doesn't need to run every single frame. But I stripped it from this example, as it'd just conflate the point.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...