Jump to content

Need spell scripting help, please


kinggg2

Recommended Posts

Hi! I've been working on my mod 'Wise old man spells' for quite a while now, but all along I've had the same problem; whenever I use the script:

 

'player.placeatme (creature id here)'

 

it summons 3 monsters instead of one. When I put a number after the name, like:

 

'player.placeatme (creature id here) 1',

 

it multiplies it by 3, so if I put in 3 instead of 1, I'd get 9. It's the same when I change the duration of the spell. I wouldn't think that this is intentional. Is it?

 

Help would be appreciated. Thanks all!

Link to comment
Share on other sites

I'm not sure why that's happening, but it's not a good idea to use PlaceAtMe in a spell.

 

PlaceAtMe creates a new reference, and thus increases the size of your savegame. If you only use it a couple of times, it doesn't matter, but when using this command many times (a spell, for example) problems appear. Your savegame will become too large. When it reaches about 10 MB, bad things start happening, such as extended load times, frequent crashes and it might even corrupt the save.

 

So I suggest you try a different approach. Perhaps placing a creature in a dummy cell and then moving it to the player when the spell is casted.

Link to comment
Share on other sites

Thanks for the help. I saw something similar to that in a different thread, but it was used for the same sort of type of spell as in vanilla summoning. Do you know if it would work for permanently summoning multiple creatures? And if it does, would I have to place a creature in the cell for every one I wanted to summon? And if they died, would they respawn there?

 

So many questions :P Thanks again, I'll probably try that anyways if I can't find a way around it.

Link to comment
Share on other sites

I'm not sure why that's happening, but it's not a good idea to use PlaceAtMe in a spell.

 

PlaceAtMe creates a new reference, and thus increases the size of your savegame. If you only use it a couple of times, it doesn't matter, but when using this command many times (a spell, for example) problems appear. Your savegame will become too large. When it reaches about 10 MB, bad things start happening, such as extended load times, frequent crashes and it might even corrupt the save.

 

So I suggest you try a different approach. Perhaps placing a creature in a dummy cell and then moving it to the player when the spell is casted.

 

I tried that and when the creature dies it moves back to the dummy cell, but my game closes when I try to resurrect ( via script function "Resurrect" ), is there some other way to bring something back to life?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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