panterath Posted August 17, 2012 Share Posted August 17, 2012 Hello, I'm sure this has been posted before, and I'm not sure if I am posting this in the right forum, but I'll be frank. I'm trying to make a feature on an activator (like a button, stone, etc) that when I cast a touch/target spell on it, it will do an effect. Kind of like how xilver did it with Midas Magic like casting spells on containers. I'm mainly wanting it to carry out a teleport when the effect goes through. tl;dr: Scripting an activator to teleport player upon casting a touch/target spell. Thanks for your help, I appreciate it. - P Link to comment Share on other sites More sharing options...
panterath Posted August 18, 2012 Author Share Posted August 18, 2012 Also, if anyone knew how to fix this: I overwrote a birthsign with a new one, how can I fix it back to its original birthsign but make the one I made as an extra? - P Link to comment Share on other sites More sharing options...
WarRatsG Posted August 18, 2012 Share Posted August 18, 2012 You can create a block starting with "Begin OnMagicEffectHit" for the activator. Just use it the same way that you would use "Begin GameMode", or any other Begin command. You can even add a parameter so that only certain magic effects will make the script start, for example "Begin OnMagicEffectHit FIDG" will make sure that the block only starts when the activator is hit by a fire spell. Birthsigns have always been weird that way. Making a new birthsign is often unreliable, usually not showing up at all. Editing a birthsign is far more reliable.That said, you could make an ordinary Ability, then add it to the player via script while removing any other birthsign abilities. It won't appear on the normal birthsign menu, but it will still be a completely new birthsign instead of an edited one. Link to comment Share on other sites More sharing options...
panterath Posted August 20, 2012 Author Share Posted August 20, 2012 You can create a block starting with "Begin OnMagicEffectHit" for the activator. Just use it the same way that you would use "Begin GameMode", or any other Begin command. You can even add a parameter so that only certain magic effects will make the script start, for example "Begin OnMagicEffectHit FIDG" will make sure that the block only starts when the activator is hit by a fire spell. Birthsigns have always been weird that way. Making a new birthsign is often unreliable, usually not showing up at all. Editing a birthsign is far more reliable.That said, you could make an ordinary Ability, then add it to the player via script while removing any other birthsign abilities. It won't appear on the normal birthsign menu, but it will still be a completely new birthsign instead of an edited one. Thanks for your help. I was able to remove the custom birthsign, and I just decided to make to turn the birthsign into a "Spell Tome". I tried the OnMagicEffect block and have it only activate with shock damage spells, but it still can't get it to work :confused: If you have some scripting experience, could you show me an example of what to make it? - P Link to comment Share on other sites More sharing options...
WarRatsG Posted August 20, 2012 Share Posted August 20, 2012 So for the OnMagicEffectBlock, you want it to teleport the player when it is hit by a shock spell? Replace anything surrounded by < > with the name of the thing mentioned inside the arrows. Scn <script Name> Short bActive ;An ON/OFF switch Float fTimer Begin OnMagicEffectHit SHDG Set bActive to 1 ;Turn on the timer End Begin GameMode If bActive == 0 Return Else If fTimer < 3 Set fTimer to (fTimer + GetSecondsPassed) Else Set bActive to 0 Set fTimer to 0 Player.MoveTo <Marker> ;Note, this command will act as a return function as well. ;Code from here will not execute endif endif End This script should teleport the player 3 seconds after the scripted object is hit by a spell with a shock damage effect. Link to comment Share on other sites More sharing options...
panterath Posted August 22, 2012 Author Share Posted August 22, 2012 This was very helpful thank you! I guess adding a timer and active was a great idea. I went ahead and added messages too, because I am using this a part of a quest. If the player has reached a point in the quest, it will work, if not, it won't. Thanks again. - P Link to comment Share on other sites More sharing options...
Recommended Posts