GamerRick Posted September 17, 2022 Share Posted September 17, 2022 (edited) What are you supposed to use in these two commands? SetMagicEffectLightSetMagicEffectLightC I want to change the Light used by the LGHT Magic Effect, which is currently set to Light object SpellILightSpellMedium. I want to change the LGHT effect to use my light instead: SetMagicEffectLightC RFSpellILightSpellOrangerLarge effectCode:long What is a effectCode:long?? I can't find these anywhere. Is there a number for LGHT? SetMagicEffectLight RFSpellILightSpellOrangerLarge effect:ref What is that supposed to be?Thanks!!! Edited September 17, 2022 by GamerRick Link to comment Share on other sites More sharing options...
IcelandicPsychotic Posted September 17, 2022 Share Posted September 17, 2022 You could check how this mod does it. Maybe it can help you. Link to comment Share on other sites More sharing options...
RomanR Posted September 17, 2022 Share Posted September 17, 2022 (edited) Effect code itself is nothing more than chars of effect in Ascii numbers. OBSE has commands to convert them both ways, for you it would be GetMagicEffectCode or MagicEffectCodeFromChars. The rest should be easy. Docs for these commands are in "Magic Effect Setting" part. For example: int ef_code ref my_light begin (something) ............... set my_light to (your light object) let ef_code := GetMagicEffectCode "LGHT" ;or try MECodeFromChars if ef_code != 0 SetMagicEffectLightC my_light ef_code endif end In your older thread regarding opposite effects there are examples how to work with them (they use codes conversion to characters). Edited September 17, 2022 by RomanR Link to comment Share on other sites More sharing options...
GamerRick Posted September 17, 2022 Author Share Posted September 17, 2022 (edited) Thanks RomanR! Strange this is another thing you have to do a GetXxxx command on. I would think the LGHT code would always have the same number assigned to it. Somewhere they said that the number is equal to LGHT, which makes about as much sense as many of their design decisions. What you would get from that get command would always be the same number, wouldn't it? And I can just enter that number in my command, no? I copied all of your code into a text doc, because there is a lot in there, but when I looked through it yesterday, I didn't spot anything for this question. Edited September 17, 2022 by GamerRick Link to comment Share on other sites More sharing options...
GamerRick Posted September 17, 2022 Author Share Posted September 17, 2022 (edited) IcelandicPsychotic, on 17 Sept 2022 - 03:18 AM, said:You could check how this mod does it. Maybe it can help you.Thanks!!! Edited September 17, 2022 by GamerRick Link to comment Share on other sites More sharing options...
GamerRick Posted September 18, 2022 Author Share Posted September 18, 2022 (edited) I got this to work, but not as I hoped it would. The Light objects of a LGHT Spell is apparently only used for the tint color. The radius isn't used. Setting the LGHT Light object does not affect a light spell currently active. I gotta recast the spell to see an effect. scn RFLightSpellQuestScript float fQuestDelayTime ref rCurrLight ref rNextLight long iHotKey long iLGHTCode Begin GameMode ;return if GetGameLoaded set fQuestDelayTime to 0.01 set iHotKey to 211 ; Delete key let iLGHTCode := GetMagicEffectCode LGHT if rCurrLight == 0 set rCurrLight to SpellILightSpellMedium else SetMagicEffectLightC rCurrLight iLGHTCode PrintC "Light set to %n" rCurrLight endif endif if OnKeyDown iHotKey == 1 if rCurrLight == 0 || rCurrLight == RFSpellILightSpellOrangerDark set rCurrLight to SpellILightSpellMedium elseif rCurrLight == SpellILightSpellMedium ; Default Light object used by LGHT set rCurrLight to RFSpellILightSpellOrangerLight else set rCurrLight to RFSpellILightSpellOrangerDark endif SetMagicEffectLightC rCurrLight iLGHTCode endif endI can see a small change in tint between the three lights I am using. So, it's useful maybe when the standard brightness is too much. Edited September 18, 2022 by GamerRick Link to comment Share on other sites More sharing options...
Recommended Posts