qwertypol012 Posted January 11, 2018 Share Posted January 11, 2018 (edited) Hello everyone, I need an assistance with 2 issues. First, i'm trying to add some long-term effects after using a particular spell. The idea is that after using the spell for several times (say, 5 times for example), a "long-term" effect will kick in and affecting the character. What i'm thinking is that the long-term effect is handled by a magic effect which is casted when the amount of spell usage is fulfilled. That's what i need assistance for, since i don't know how to check if the spell has been casted for 5 times. I couldn't find any condition functions which allow me to set the scenario, but i'm not familiar with all of the condition functions so there are probably some functions i can use in which i'm currenly having no idea about it. So, is there anyone know about it? Second, still using the same spell as above issue, i'm trying to make the duration of the spell is based on some factors, and one of them is body weight. The bigger the body weight, the longer the spell will run. I tried to look for some actor values, perk entry point, and condition functions but i couldn't find any on how to check the body weight. So, is there any way to do it?Also, since the duration of the spell is based on some factors, do you know how to set it (using these factors altogether to determine the spell duration)? That's it. Thanks in advance for anyone who is willing to help me with these issues. :smile: Edited January 11, 2018 by qwertypol012 Link to comment Share on other sites More sharing options...
Evangela Posted January 11, 2018 Share Posted January 11, 2018 (edited) Argonians, High Elfs and Khajiit Males are the only playable races with a weight of 0.5. The rest are 1.0. Thus you only need to check for the race the player is, and if the player is male, and from there make adjustments. There's no way to get those values through perks, or natively through scripting, but now that you know their values, you can use them in a script variable and do whatever, when the conditions are true. One way I can think of to check for n number of times a spell has been cast is by keeping track of a certain spell using the OnSpellCast event. Edited January 11, 2018 by Rasikko Link to comment Share on other sites More sharing options...
Sporny Posted January 11, 2018 Share Posted January 11, 2018 I think you method for counting the times the spell has been cast Rasikko's post could work. If you do something rough like: int count Event OnSpellCast(Self) count = count + 1 if count == 5 {Do your super cool effect} count = 0 endif EndEvent I'm not a 100% on the syntax but the general idea should keep track of number of times the spell has been cast, do the special effect on 5 cast, then reset the counter. Link to comment Share on other sites More sharing options...
qwertypol012 Posted January 11, 2018 Author Share Posted January 11, 2018 Thanks for the reply guys :) @Rasikko,I don't really understand. Do you mean that no matter what body weight scale the player set for their characters (for example: 60 weight), it will always be 1.0 for all races except those 3 races (which is 0.5)?Actually what i'm trying to achieve is to check the weight scale on the player character who uses the spell. If a character has 60 body weight, then the spell duration will be shorter than a character who has 100 body weight. That's what i'm looking for, not the base body weight but the current body weight used by the player for their character. It also goes along with any mods modifying character weight, such as Pumping Iron, so that everytime the character gain weights in game (via the mod) then the duration of the spell will also be increased. Body weight scale from 0 to 100 is what i'm trying to use as a check for the spell duration. Just to make it clear in case it wasn't clear. @Sporny,I see. Thanks, it really should help me. I'll try what i can do with that. :) Link to comment Share on other sites More sharing options...
Evangela Posted January 12, 2018 Share Posted January 12, 2018 (edited) I need to make a correction to my previous statement. The player's weight can be found through scripting, through SKSE. I missed that page on the wiki, sorry about that. Indeed the weight can be changed if one desires during the creation character process. I believe what I was looking at on the races were just default weight values. https://www.creationkit.com/index.php?title=GetWeight_-_ActorBase To support sporny's post: Spell property thisSpell auto int count Event OnSpellCast(Form akSpell) if akSpell == thisSpell count += 1 if count == 5 ; do stuff endif endif EndEvent Edited January 12, 2018 by Rasikko Link to comment Share on other sites More sharing options...
Recommended Posts