I currently try to get used to the new scripting language, so I thought of starting with some simple tasks. I want to create a spell which clears/unclears a location, so you can choose whether the place gets the "cleared" flag on your map or not. I ended up with this:
Scriptname MM_ClearLoc extends ActiveMagicEffect {Clears or unclears Location on Spell use}Event OnEffectStart(Actor akTarget, Actor akCaster) if akCaster.GetCurrentLocation().IsCleared() akCaster.GetCurrentLocation().SetCleared(false) else akCaster.GetCurrentLocation().SetCleared() endifEndEvent
but apparently this doesn't work (actually, nothing happens at all). I think, I set up the magic effect and spell stuff correctly.
so is there anything in here, which does not look kosher?