Jump to content

How to make a toggle spell-Vapirism


Recommended Posts

I need help with a spell I plan on making but I don't know how to make it so I can toggle vampirism when I use it once to become a vampire and then again to change back I just need one bit ( if (player.isspelltarget *name* = 0) I don't know what to put where *name* is so I can make the script, if I need to use a different thing please help

Link to comment
Share on other sites

Well, firstly it'd be good some extra info so we can help you. Your entire script wouldn't hurt; that way we could help you in your problems with this function with some understanding of its context.

 

If I understood right -I don't know if I did, 'cause like I said its quite difficult to know what you have planned-, you do not know what to put on the name part of the syntax of the IsSpellTarget function. I'm guessing what you want to do is to make the script know if your character is being currently affected by your spell (this is, if he is a vampire), so if he is not he becomes a vampire, and if he is, he ceases to be one.

 

I'm also gonna guess here, but I suppose you have already created your spell and the script that makes it run properly. In which case, if both of my guessings are right, in *name* you should put your spell's ID; this is, the ID your spell has on the object window of the CS, on the Magic tree.

 

Then again, it would had been so much easier to help you with a little bit more of clarity. Anyway, I hope I got it right.

Link to comment
Share on other sites

Sorry I should have explained more. I'm trying to make it so when I'm not a vampire and I use it I will change into one and when I am a vampire it will cure me, I've successfully made a script, but it won't turn me into one (characters name is tiny by the way)

 

Script Name AaATinysVampTog

if ( vampirism100 )

Player.removespell Vampirism100

Player.removespell vampirism100skills

Player.removespell vampirism100att

;and so on with vamp spells at lvl 100

else

Player.addspell Vampirism100

player.addspell Vampirism100Skills

Player.addspell Vampirism100att

;again with the lvl 100 vampire spells

setPCVampire to 4

 

endif

end

 

Edited by JimmyChooChoo
Link to comment
Share on other sites

Hm, okey. So, I've been looking in the wiki and found this. Vampirism is actually an ActorValue that goes from 0 to 100. 100 would have the highest morphological transformation and a totally developed vampire. If you want your character to turn into a fully grown hungry deeply evil vampire, you should set his Vampire value to 100. Your spell script should look like this in general:

 

 

 

 

Begin ScriptEffectStart

 

If ( PlayerRef.IsSpellTarget *yourspell* == 1 ); this is, if you use your spell on your character

If ( PlayerRef.GetVampire => 1 ); this is, if his ActorValue Vampirsm is equal or bigger than one (if he is a vampire)

PlayerRef.SetActorValue Vampirisim 0

Else; this would be if he is NOT a vampire

PlayerRef.ModActorValue Vampirisim +100; this is, set his Vampirism value to 100 (or the number you want)

 

EndIf

EndIf

 

End

 

 

 

Of course, what's next of the ; symbol on the script I wrote are notes and comments on what the script does, you do not need to copy them or use them in any way.

 

EDIT: Is the first time I do anything with vampirism value and just the second time I do a magic spell script, so mistakes can be made. Although everything looks good in the script, if it doesn't work correctly post it here and we'll try to solve it together.

Edited by PkSanTi
Link to comment
Share on other sites

From what ive figured when I swapped the removespell and the addspells around it would change me into a vampire, but it will not cure me when I use it again so I have got close and I believe what you have suggested should work and I thank you as this will be much help to many people. :thumbsup:

Link to comment
Share on other sites

so far no script errors just need to check in game if this works then you are sure to be a gem

 

EDIT: ok you are most a gem I thank you infinity times and it works I really do thank you, from this hard work if I'm to upload anything including a spell to toggle things I will credit you for the script helping, again I thank you.

Edited by JimmyChooChoo
Link to comment
Share on other sites

If you wish to know how the script is set out then here:

 

 

ScriptName (whatever you wish it to be called)

 

Begin ScriptEffectStart

if [ PlayerRef.Isspelltarget Vampirism100 ==1)

player.removespell vampirism 100

player.removespell vampirism100att

player.removespell vampirismskill

player.removespell vampireEmbraceofShadows

player.removespell vampireSeduction

player.removespell vampireReignofTerror

player.removespell vampireHuntersSight

 

else

player.addspell Vampirism100

player.addspell Vampirism100att

player.addspell vampirismskills

player.addspell vampireEmbraceofShadows

player.addspell vampireHuntersSight

player.addspell vampireSeduction

player.addspell vampireReignofTerror

setPCVampire to 4

 

endif

end

 

Link to comment
Share on other sites

There will be reason to credit you for if you weren't here then I wouldn't have been successful with such script, so you deserve credit and as thanks I believe I will upload the file which was mainly just for me as it's named after my only character :thumbsup:

Edited by JimmyChooChoo
Link to comment
Share on other sites

I think you're missing an If statement in your script. Wouldn't it be like this?

 

 

ScriptName (whatever you wish it to be called)

Begin ScriptEffectStart

if [ PlayerRef.Isspelltarget Vampirism100 ==1)

if ( PlayerRef.GetActorValue Vampirism => 1 ); this way it will only remove his spells when he is a vampire?

player.removespell vampirism 100

player.removespell vampirism100att

player.removespell vampirismskill

player.removespell vampireEmbraceofShadows

player.removespell vampireSeduction

player.removespell vampireReignofTerror

player.removespell vampireHuntersSight

else

player.addspell Vampirism100

player.addspell Vampirism100att

player.addspell vampirismskills

player.addspell vampireEmbraceofShadows

player.addspell vampireHuntersSight

player.addspell vampireSeduction

player.addspell vampireReignofTerror

setPCVampire to 4

endif

endif

end

 

I may be wrong, since it seems you don't use the Vampirism's Actor value, but just adding the vampire spells to the player, which would make sense if you don't want him to age. But still an If statement would be missing after the first one; one that checks that the player is already a vampire, and only then removes his powers. That way, it would be in humans language:

If he is the target of your spell,

If he is a vampire

Remove his vampirism

Else (if he is not a vampire)

Make him a vampire

EndIf

EndIf

EDIT: I was in a hurry today so I just tried to focus on the script. Regarding the credits, well, if you insist, I wont deny, since there's not much I can do about it, but I will too insist in the fact that my help was little and I don't consider it worth the honour. Thank you very much anyway. See you!

Edited by PkSanTi
Link to comment
Share on other sites

  • Recently Browsing   0 members

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