Jump to content

Creating spells for specific race only


PrivateEye

Recommended Posts

So I've been trying to create an object that adds a spell to the player, depending if the player is a vampire or not.

 

What I did was create 2 spells and have both added to the player by script when equiping a certain object. In both spells I set up conditions.
The conditions for Spell nr 1. is that the player has to be of a non-vampire playable race to use it (Nord race or BretonRace, etc.).
For spell nr 2. I set up the conditions so that the player has to be a vampire race to use it (NordRaceVampire, BratonRaceVampire, etc.).
My goal here was to have one spell usable by only vampires and the other usable by only non vampires.

Now, my hope was that when equipping the item, both spells would be added to the player but only one of the 2 would show up in the magic menu, depending on if the player is a vampire or not. That didn't work.. Both spells show up and are usable, no matter what race the player is. The conditions don't seem to do anything. But I'm not sure why..

I hope this explanation is clear enough to get the idea. Anybody have any idea why this doesn't work? I bet I do something very simply stupid here...

Link to comment
Share on other sites

  • 1 month later...

Maybe it does work when you use the PCVampire global in the condition.

 

So if the player is a vampire, the condition can look like this:

if (PCVampire > 0)

source: http://cs.elderscrolls.com/index.php?title=GetVampire

 

 

Edit: do you need this for Oblivion or Skyrim?

 

 

Edit2:

 

if this is for Skyrim:

 

I'm not that good in Skyrim scripting but have an idea: you can check if the player has weakness to sunlight which vampires have. I found this in the scipt in that post: http://forums.nexusmods.com/index.php?/topic/986732-first-time-creating-a-scriptmod-need-some-help/?p=8004346

if GetActorRef().HasSpell(WeaknessToSun)
Edited by Selene310187
Link to comment
Share on other sites

  • Recently Browsing   0 members

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