• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spell Level Detection

Status
Not open for further replies.
Level 18
Joined
Mar 13, 2009
Messages
1,411
I was working on a Spell Book based spell that could be leveled. This Book would contain traps (normal abilities). Now I wanted to level those traps when the book gets leveled, but I do not know how to do this.

Could anyone help me with this? +rep for helpers ;P
 
Level 4
Joined
Apr 18, 2009
Messages
127
Can't u just add a new spellbook including all the spells? (current rank +1)
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
How would I have to set levels for the normal abilities if I did and how do I check what level the spellbook I trained was?


Off-Topic: Yay dragons :p
 
Level 4
Joined
Apr 18, 2009
Messages
127
At least for the spellbook u use variables.

Just make conditions like:
  • Spellbook_Lvl Equal to 1
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Hmmm, would I make my spell MPI with that if I had to use a player array D:?
I will ask the guy I am working for whether that is a problem or not.

But what Event do I need to use if a player adds a level to the ability?
 
Level 4
Joined
Apr 18, 2009
Messages
127
You can make a "upgrade" book spell or just use:

  • Unit - A unit Learns a skill
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
The abilities inside must be unit abilities, but give them as many levels as the spellbook. Then do:
  • Events
    • Unit - A Unit Learns a Skill
  • Conditions
    • (Learned Hero Skill) Equal to Spellbook
  • Actions
    • Unit - Increase level of Ability 1 for (Triggering unit)
    • Unit - Increase level of Ability 2 for (Triggering unit)
    • Unit - Increase level of Ability 3 for (Triggering unit)
    • ...etc
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
The spellbook itself has 20 levels
There are 4 abilities inside it. The first one is available at start and the others you will get at 5,10,15 (using a dummy spell that requires an upgrade for when levels are lower that says Level 5 Required (for example).

From level 1 to 5 I will have to up only the first ability then on 5 a new one will be added and will be upped from there on etc...

Now how would I have to check at what level I got it (without using vars if possible)
 
Level 4
Joined
Apr 18, 2009
Messages
127
I hardly believe there is a way to do this without variables. If you want it as leak free as possible tho.


Off-topic: GRATZ WITH DRAGON
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Ah, that's different. Create researches, 1 for each milestone, give the skills dependencies and do:
  • Events
  • Unit - A Unit Learns a Skill
  • Conditions
    • (Learned Hero Skill) Equal to Spellbook
  • Actions
    • If all Conditions are true then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Spellbook for (Learning Unit)) Equal to 5
      • Then - Actions
        • Player - Set the current research level of Level 5 to 1 for (Owner of (Triggering unit))
      • Else - Actions
        • Do Nothing
Of course this only works if one player can only have 1 hero of this type.
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Nah I think it can be MUI because I made 2 abilities for each trap. 1 that needs the level upgrade and one without. At the right level the one with requirement is replaced with the one without. The upgrade is not used for the spell, but used as a little thing to make things more clear :p

I never knew Skill learned worked for leveling, but if that is true:

-Case closed and rep :D
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
Nah I mean ability learning so that helped me :)

{EDIT}
Aw when I level it from 1 to 2 I can now level the ability, but from 2 to 3 it becomes level 1 again. I can just trigger that though :p
 
Last edited by a moderator:
Level 12
Joined
Aug 22, 2008
Messages
911
The most triggerless way would be to create 20 abilities, one for each level, and attach each ability to its spellbook level. I know 20 abilities isn't very supportive, so use triggers... Although you shouldn't as long as you don't have to.
 
Status
Not open for further replies.
Top