Page 1 of 1

How do I get autosave on attack?

PostPosted: Wed Dec 30, 2009 12:08 pm
by FLYBOYLEAK
Hey guys, I can't really find an answer so far but how do I get a weapon to autosave on strike? I have a weapon that does a huge amount of damage but whenever I attack someone with any kind of reflect damage then I die before I know what happened. So I'm trying to find a solution and I want to have a script run whenever I swing the weapon, is this possible? This is my first script for a game so sorry for the simplicity of the question, I have some experience in coding visual basic.net, php, css, html, xhtml, javascript, etc. so if someone could atleast point me in the right direction then I would be thankful. Here's some markup of what I was thinking but this doesn't work, any suggestions?

scriptname SaveInCombatbegin OnHitWith SDGlassCrudeAutosaveend


Once again, thanks for any help guys, - d

How do I get autosave on attack?

PostPosted: Wed Dec 30, 2009 9:18 am
by Isabella X
OnHitWith only works on creatures/npcs

That script would only work if it was on a creature and you hit it with that weapon.

What you'll want to do is add an enchantment to the sword with a scripted effect, with the Autosave being in the script effect section.

If it's just for testing purposes, you could make a creature with the reflect spell on it, and the above script as well and just spawn that creature with the console to test the sword.

You might find that the saves are corrupt, though....it sounds like a rough time to do a save.

How do I get autosave on attack?

PostPosted: Wed Dec 30, 2009 6:02 pm
by Haley Cooper
Haha, it worked(thanks for the advice) but not the way I wanted it to. I guess the save doesn't take place until after I die...I don't even have enough time to open the menu when I load the last autosave. Is there anyway to autosave when I come into the "nearby enemy" message?

How do I get autosave on attack?

PostPosted: Wed Dec 30, 2009 2:53 pm
by Rebecca Dosch
You want to save when combat begins?

You'll need a quest script on a constantly running quest, with a condition of

short savedelay

begin gamemode

if savedelay == 0
if player.isincombat == 1
Autosave
set savedelay to 1
endif
endif

if savedelay == 1
if player.isincombat == 0
set savedelay to 0
endif
endif

end

That should save about the same time the "combat music" starts. It's a rough script, though, and if you are in and out of combat a lot you'll get a lot of autosaves, increasing the chances of corruption.

How do I get autosave on attack?

PostPosted: Wed Dec 30, 2009 6:05 pm
by Stace
Don't know if I would chance trying to do an autosave when the game is making all of the changes it is when you enter combat (seems like asking for a corrupted save - esp with all of the problems the game already has with autosaves !!)

How do I get autosave on attack?

PostPosted: Wed Dec 30, 2009 8:51 pm
by Yvonne Gruening
Unfortunately, something like this is just a bad idea waiting to happen. It might be more prudent to just set the quicksave key to something within reach, and to make use of it before entering any particularly challenging battles. Then you have your autosave and normal saves still there incase one gets corrupted.

Any automatic process is also likely to get tiresome for the player anyway. Dragonage has this sort of "feature" built in, and while somewhat useful, also acts to kill the surprise of being attacked and adds that little bit of delay to when combat starts. In the case of Oblivion, this little delay as things get saved would not only exist in cases when the player attacked, but also if the player had started attacking someone. Which makes it doubly annoying.