Manway Posted January 11, 2017 Share Posted January 11, 2017 So, I had a look at the scripting basics on the creation kit wiki, and I have to say, its not really ordered well. I had trouble finding more specific script examples, everything I found was generic or not explained very well. For example, I found the function "Revert()" but when it says "all script added forms" does it mean, completely? Like even spells I got from specific quests days ago? Basically, I want to create a new magelight spell that lights up a larger area; but make it so the player gets it only while they're in a specific area, and have it taken away once they leave. How would I do that? Also, is there a way to create a spell, that will activate when I block (like spell breaker) that will ONLY block shouts and not normal spells? Link to comment Share on other sites More sharing options...
Lisselli Posted January 11, 2017 Share Posted January 11, 2017 (edited) This is what I would do. Place an xmarker in the desired area.Add this script to the xmarker: Scriptname MagelightAttachScript extends ObjectReference Spell property MageLight auto ; Whatever the name of this spell actually is. Event OnCellAttach() Game.GetPlayer().AddSpell(MageLight) EndEvent Event OnCellDetach() Game.GetPlayer().RemoveSpell(MageLight) EndEventEvery time you enter this cell, the spell is added. When you leave the cell, it's removed. Works best in an interior.I don't know how to make their light area larger. Edited January 11, 2017 by Lisselli Link to comment Share on other sites More sharing options...
Manway Posted January 11, 2017 Author Share Posted January 11, 2017 Nice, short and simple. I like it, thanks. Just making sure though, I see that "Whatever the name of this spell actually is" is in different colors. Is that significant? Or do I just do: Spell property MageLight auto ; Stronger_MageLight Also, I though making MageLight/Candlelight brighter would be as simple as duplicating it and increasing the magnitude. That doesnt seem to do anything though :/ Anyway, anyone know how to block only shouts? Link to comment Share on other sites More sharing options...
Lisselli Posted January 12, 2017 Share Posted January 12, 2017 The different colors thing is just the code tag format. Link to comment Share on other sites More sharing options...
SkyFireXxx Posted January 12, 2017 Share Posted January 12, 2017 Nice, short and simple. I like it, thanks. Just making sure though, I see that "Whatever the name of this spell actually is" is in different colors. Is that significant? Or do I just do: Spell property MageLight auto ; Stronger_MageLight Also, I though making MageLight/Candlelight brighter would be as simple as duplicating it and increasing the magnitude. That doesnt seem to do anything though :/ Anyway, anyone know how to block only shouts? In the script anything you write after the ; is a comment. Comments do not execute.To make candle lights brighter or increase the area, duplicate the Magic Effect, increase the intensity and fall off radius then create a new spell using this new magic effect. Link to comment Share on other sites More sharing options...
Manway Posted January 12, 2017 Author Share Posted January 12, 2017 (edited) Nice, short and simple. I like it, thanks. Just making sure though, I see that "Whatever the name of this spell actually is" is in different colors. Is that significant? Or do I just do: Spell property MageLight auto ; Stronger_MageLight Also, I though making MageLight/Candlelight brighter would be as simple as duplicating it and increasing the magnitude. That doesnt seem to do anything though :/ Anyway, anyone know how to block only shouts? In the script anything you write after the ; is a comment. Comments do not execute.To make candle lights brighter or increase the area, duplicate the Magic Effect, increase the intensity and fall off radius then create a new spell using this new magic effect. Sorry, but I didnt find what you were talking about. I went into Magic Effects and found the Candlelight spell (ID: LightFFSelf) but I didnt see anything to change the intensity or the fall off radius. However, under the Visual Effects section of the Magic Effect window I see a drop down menu called "Casting Light" with "MagicLightLightSpellHand01" (lol, LightLight.) I searched for that and found a Light effect, opening that brings up a window that does have radius and "Fade" which the wiki describes as kind of a brightness setting. I'm guessing I play with that. I'll try testing it slowly while I make the finishing touches on my cave, but if anyone can suggest some numbers to use to very faintly light up a cave half the size of Blackreach, that would be great. I'm sort of going for the same feel from LOTR when Gandalf lights up that huge part of Moria, not very bright, but enough to see how big the cavern is. Also, still hoping someone knows a way to create a ward spell or something that blocks only shouts >.> Edit: So I decided that instead of giving the player the spell while they're in the entire cell, I just want them to get it in the last room so I created a trigger box with the following code: Scriptname StrongerLightCheck extends ObjectReference Actor Property PlayerREF Auto ; Least 'costly' way to refer to the player Spell Property Candlelight_Stronger Auto Event OnTriggerEnter(ObjectReference akActionRef) If akActionRef == PlayerREF ; This condition ensures that only the player will trigger this code if (Game.GetPlayer().HasSpell(Candlelight_Stronger)) Debug.Trace("Player has Stronger Light") Game.GetPlayer().RemoveSpell(Candlelight_Stronger) else Debug.Trace("Player does not have Stronger Light") Game.GetPlayer().AddSpell(Candlelight_Stronger) endIf EndIf EndEvent but nothing happens. I feel like its a problem with how I created the trigger box because I cant even find a log in my game folder. I made a trigger box that completely covers a doorway, and then I right clicked and hit Edit to open the Reference window, went over to scripts, and then just created a new one. So can someone help me figure out where I stupid'. Edited January 13, 2017 by Manway Link to comment Share on other sites More sharing options...
Manway Posted January 17, 2017 Author Share Posted January 17, 2017 Bump... anyone? Link to comment Share on other sites More sharing options...
Lisselli Posted January 18, 2017 Share Posted January 18, 2017 Your script looks fine, except you don't need Game.GetPlayer() when you can use PlayerRef throughout.I think there's something up with how the trigger is set up, but I'm not sure what. Link to comment Share on other sites More sharing options...
Manway Posted January 19, 2017 Author Share Posted January 19, 2017 (edited) Any ideas of how I can test the trigger box? Also nothing I do seems to make the custom candlelight spell any stronger. I increased both the fade and radius of the light effect and I cant notice any difference. It's possible its doing something and I'm just using the wrong values. Are there any limits? What sort of numbers should I use if I want to double, or triple the area the spell lights up? Also, I added a dragon with a custom race so it doesnt fly that I duplicated from the basic Dragon race. The dragon itself is a duplicate of the EncDragon05Fire. However, both in the Creation Kit and in game the dragon doesnt render. I checked the body data for the race and the new flightless race is an exact copy of the original, but when I click either box to preview the model, nothing appears. Also, not sure if this is a side effect, but when I went to where the dragon was located in game, it was already dead. A normal magelight spell attached to the invisible corpse, I was able to loot it, and when I got close I absorbed the soul. And still waiting for ideas on how to scrip something to block shouts :tongue: I'd rather not just give the reward at the end a powerful fire encha.... hmm, I wonder what would happen if I enchanted it with Fire Breath :tongue: Edited January 19, 2017 by Manway Link to comment Share on other sites More sharing options...
Masterofnet Posted January 19, 2017 Share Posted January 19, 2017 (edited) I wonder what would happen if you started watching and reading some tutorials instead of coming here and expecting people to do your mod for you. :confused: Edited January 19, 2017 by Masterofnet Link to comment Share on other sites More sharing options...
Recommended Posts