Difference between revisions of "SetNthEffectItemDuration"
Jump to navigation
Jump to search
imported>Haama (Created) |
imported>Haama (Notes) |
||
Line 2: | Line 2: | ||
(nothing) SetNthEffectItemDuration nuDuration:long magicItem:ref whichEffect:short | (nothing) SetNthEffectItemDuration nuDuration:long magicItem:ref whichEffect:short | ||
(nothing) SetNthEIDuration nuDuration:long magicItem:ref whichEffect:short | (nothing) SetNthEIDuration nuDuration:long magicItem:ref whichEffect:short | ||
==Notes== | |||
* If you use a non-integar number (float; i.e., 2.5), the resulting duration will be the nearest whole number less than that number. For instance, if you set duration to 2.6 then the resulting magnitude will be 2. | |||
* If you set the duration to 0 (really any number > -1 and < 1), the spell will have the same effects as if it had a duration of 1. That is, a '''Damage Health''' spell with a magnitude of 5 and duration of 0 will take off 5 HP. If cast on the player, the player, the spell icon(s) will not appear. | |||
** Note that if you're using a scripted effect, it will still run. However, the spell will only run for 3 frames, rather than the full second. | |||
* You can set the duration of a spell to a negative number (due to rounding issues, really any number <= -1), but the spell will have no effect. If cast on the player, the spell icon(s) will briefly appear. | |||
** Note that if you're using a scripted effect, it will still run. However, the spell will only run for 3 frames, rather than the full second. | |||
* You can set the duration of any magic item, even if it normally doesn't have a duration and it's grayed out in the CS. This won't do anything or even appear in-game, but you can retrieve it with [[GetNthEffectItemDuration]], making it a good way to store integer data. | |||
* (Unconfirmed, but likely) Using this function on a non-cloned spell (any spells from Oblivion.esm or mods) will change the duration of the spell, but only until the player re-loads their game. The most likely explanation is that Oblivion retrieves the spell's data from the mod/Oblivion.esm when loading, while cloned spells' data come from the save file itself. | |||
Revision as of 11:14, 31 August 2007
SetNthEffectItemDuration - sets the duration of the specified effect item
(nothing) SetNthEffectItemDuration nuDuration:long magicItem:ref whichEffect:short (nothing) SetNthEIDuration nuDuration:long magicItem:ref whichEffect:short
Notes
- If you use a non-integar number (float; i.e., 2.5), the resulting duration will be the nearest whole number less than that number. For instance, if you set duration to 2.6 then the resulting magnitude will be 2.
- If you set the duration to 0 (really any number > -1 and < 1), the spell will have the same effects as if it had a duration of 1. That is, a Damage Health spell with a magnitude of 5 and duration of 0 will take off 5 HP. If cast on the player, the player, the spell icon(s) will not appear.
- Note that if you're using a scripted effect, it will still run. However, the spell will only run for 3 frames, rather than the full second.
- You can set the duration of a spell to a negative number (due to rounding issues, really any number <= -1), but the spell will have no effect. If cast on the player, the spell icon(s) will briefly appear.
- Note that if you're using a scripted effect, it will still run. However, the spell will only run for 3 frames, rather than the full second.
- You can set the duration of any magic item, even if it normally doesn't have a duration and it's grayed out in the CS. This won't do anything or even appear in-game, but you can retrieve it with GetNthEffectItemDuration, making it a good way to store integer data.
- (Unconfirmed, but likely) Using this function on a non-cloned spell (any spells from Oblivion.esm or mods) will change the duration of the spell, but only until the player re-loads their game. The most likely explanation is that Oblivion retrieves the spell's data from the mod/Oblivion.esm when loading, while cloned spells' data come from the save file itself.