Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Summon Companion Script


King Aaron
 Share

Recommended Posts

Hi, I'm new to modding and have very little knowledge about scripting, but I want to make a "pet" creature and a spell that summons him permanently until I cast the spell again. I already have my creature, and the FollowPlayer AI, I just need some help with the script. I know that this is possible, because it's pretty much just going to be a spell version of the summoning altar in Frostcrag Spire. Any help would be very much appreciated and I will give credit to whoever helps me when I release the mod, if I decide to release it. Thanks for reading!

-KA

Link to comment
Share on other sites

A small script like this should do what you need:

Scriptname aaISSummonScript

Ref Creature
Ref HoldingCell

;Global State

Begin ScriptEffectStart
Set Creature to YourCreatureReference
Set HoldingCell to YourStorageCell
End

Begin ScriptEffectUpdate
If (State == 0)
Creature.MoveTo Player 64 0 0
Creature.Enable
Creature.AddScriptPackage YourAIPackage
Set State to 1
Elseif (State == 1)
Creature.PositionCell 0 0 0 0 HoldingCell
Creature.Disable
Set State to 0
Endif
End[/code]

You'll need to create a global variable called State to track the state of the summon I.E to summon to player or send away. You can also customize this tio play shader effects ect.

Link to comment
Share on other sites

I copied down everything in that script, with the exception of renaming Creature to aaaKAPet and HoldingCell to aaaKAPetHoldingCell and it didn't work. Does the script have to be exactly as you wrote it or is there just something weird going on?

-KA

Edited by King Aaron
Link to comment
Share on other sites

That's only a rough script, untested at that, but it should work

What you do is this:

For this line Set Creature to YourCreatureReference, replace the YourCreatureReference with your creatures persitant reference.

And for this line Set HoldingCell to YourStorageCell, replace YourStorageCell with your storage cell name.

Link to comment
Share on other sites

I'm having a lot of trouble with this little project, now my creature is messed up! I dropped him into a shop in the Imperial City to see if he was just invisible or something, and every time I did my game crashed. I took a look at him in the Construction Set and a bunch of errors popped up, and where he should be was that nice little exclamation-point-on-a-piece-of-cheese. I know that means there is a mesh missing, and I checked and saw that all the meshes were in their correct place. I'm going to try my new script with a random monster and see if it works, then move on to fixing my monster.

Link to comment
Share on other sites

I would recommend looking at my horse summoning script in the mod Ancient Towers.

I have a horse with a simple script that does just what you want. You cast the spell, and the horse appears before you. You cast it again, and it goes to the 'home' position.

It only requires one global variable, and an XMarker at the home location with a reference ID on it.

If you look at my scirpt, you will see its a bit bigger because I also play a sound, play a magic shader on the horse, and also use the alpha to fade the horse in or out, depending on if I am calling or sending it back.

The script is: AncientSpellHorseScript

Its attached to the spell: AncientSummonWarhorseSpell as a 'script effect'.

You get the spell by reading the book: AncientBookSummonWarhorse

Link to comment
Share on other sites

Ok, I couldn't fix my monster, but I finally got the summoning script to work, so I've decided just to use a vanilla/SI monster. Now, one more script question...would it be possible to script him to ignore 3 friendly hits, attack enemies on sight, and ignore all of my hits?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...