Jump to content

Script to block shouts and remove spells


Manway

Recommended Posts

Really? You are totally clueless about anything. What tutorials could you have watched?

 

This is a good place for you to start.

 

https://www.youtube.com/user/doughamil/videos

 

 

You need to be a little more well rounded before you attempt to do the things you are trying to do.

 

What about this one???

 

Edited by Masterofnet
Link to comment
Share on other sites

Thanks for the first video, it was very interesting and also pointed out the stupid mistake I made with my dragon. As for the second video, good lord that was terrible. What was the point of even making the video if all the explanations were in his blog? He should have just taken pictures and placed them at appropriate places in the blog. In any case, I watched the entire thing and it didnt help with my trigger box problem. I tried creating a new one exactly like he did, but still nothing happens when I walk through it. I also found this tutorial and I'm still getting nothing. Based on my previous problems, I'm betting this is something really small that I'm just missing :/

 

That and editing the damn Candlelight spell, this should be so simple but no matter what numbers I use, there's no difference in the size of the light.

Edited by Manway
Link to comment
Share on other sites

Also check out the link.

 

https://www.youtube....oughamil/videos These are good videos they cover a wide range of things.

 

I have a feeling your trigger box issue is a game save issue. You are placing the trigger box into a cell that you have already loaded.

 

Travel to MixwaterMill. Walk over to the MIxwatermill workers house. Do not enter it!!! Make about 30 game saves

 

Then create a new Mod, a test mod. Before you go back into the game. Create a trigger like yours and place it inside Mixwatermillworker house. Set it up and then load the last game save you made, enter the workers house and test your trigger.

Scriptname Test extends ObjectReference  

 
Event OnTriggerEnter(ObjectReference akActionRef)
Debug.Notification("The trigger works")
EndEvent

As far as the candlelight it is very simple. You can see very clearly on the MagicEffect Template.

 

Assoc. Item 1 - MagicLightLightSpell01

 

That is a light that can have it's Raduis very easily adjusted.

 

 

Edited by Masterofnet
Link to comment
Share on other sites

Thanks I'll check out those videos, and I'll try your suggestion for the trigger box tomorrow, though I dont think thats the problem because I'm loading the cave I'm working on strait from the main menu, I'm not loading any save game. Though I'll test it all the same at least to see if the trigger and script work.

 

Also, ya I found the MagicLightLightSpell01 light effect, duplicated it, and added it to a duplicated candlelight spell. I then increased the radius and "Fade" both individually, and together, there is no noticeable difference.

Link to comment
Share on other sites

Thanks I'll check out those videos, and I'll try your suggestion for the trigger box tomorrow, though I dont think thats the problem because I'm loading the cave I'm working on strait from the main menu, I'm not loading any save game. Though I'll test it all the same at least to see if the trigger and script work.

 

Also, ya I found the MagicLightLightSpell01 light effect, duplicated it, and added it to a duplicated candlelight spell. I then increased the radius and "Fade" both individually, and together, there is no noticeable difference.

 

I find it hard to believe that increasing the radius of that light does not do anything. But I have never tried it. Why don't you try a different light?

Edited by Masterofnet
Link to comment
Share on other sites

Finally, I found the problem. Even when I played with other lights I couldnt figure out what I was doing wrong, then I decided to get ridiculous and instead of increasing the radius in increments of tens or hundreds I did thousands, that was the problem. I ramped the radius to 5000 and that had the disired effect. Still need to play with it cause I want it to cover most of the huge cave, but I want it to be a weak light so you can just barely make things out in the distance.

 

As for the script, I took your advise and tested it and using the code you gave me works, walk through the trigger and I get the message. But my script still doesnt work. I placed messeged in various parts of the script so I can see how much is working and I determined that my if statement isnt working for some reason.

Scriptname TestTriggerScript extends ObjectReference  

Actor Property PlayerREF Auto ; Least 'costly' way to refer to the player
Spell Property Candlelight_Stronger Auto

Event OnTriggerEnter(ObjectReference akActionRef)
	Debug.Notification("The trigger works")
	If akActionRef == PlayerREF ; This condition ensures that only the player will trigger this code
		if (Game.GetPlayer().HasSpell(Candlelight_Stronger))
  			Debug.Notification("Player has Stronger Light")
			Game.GetPlayer().RemoveSpell(Candlelight_Stronger)
		else
			Debug.Notification("Player does not have Stronger Light")
			Game.GetPlayer().AddSpell(Candlelight_Stronger)
		endIf
	EndIf
EndEvent

The weird thing is, regardless if I have the spell or not, neither message pops up so for some reason the if statement is skipped.

Also I have a new problem, I have no idea what I did wrong, but suddenly my dragon is constantly spawning dead. It only happens when I use a custom race I made by duplicating the basic "DragonRace" and un-checking the "Flies" box. I looked up info on duplicating races and as far as I can tell I did everything right. When I set my dragon back to the basic DragonRace it works fine...other than flying out of the cave. I tried to simplify things and grabbed the "AbNoFlightMG07dragon" spell from the Skeletal Dragon, but it still flies around. The normal "AbNoFlight" spell also doesnt work.

Link to comment
Share on other sites

If fixed up the script a little.

 

The only way that could be happening is if you are not filling the properties of the script. Did fill then and save?

Scriptname TestTriggerScript extends ObjectReference  

Spell Property Candlelight_Stronger Auto

Event OnTriggerEnter(ObjectReference akActionRef)
Actor PlayerRef = Game.GetPlayer()

	Debug.Notification("The trigger works")
	If akActionRef == PlayerRef ; This condition ensures that only the player will trigger this code
		if      PlayerRef.HasSpell(Candlelight_Stronger)
  			Debug.Notification("Player has Stronger Light")
			PlayerRef.RemoveSpell(Candlelight_Stronger)
		else
			Debug.Notification("Player does not have Stronger Light")
			PlayerRef.AddSpell(Candlelight_Stronger)
		endIf
	EndIf
EndEvent
Link to comment
Share on other sites

Tried your script, still doesn't work, though writing it that way does make a lot more sense. I still get the initial "The trigger works" message, but nothing else. Also what script properties are you talking about? For the dragon? The Skeletal Dragon only has the basic "dragonactorscript" which I did copy over to my dragon, and yes I saved, both the script and the mod.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...