• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Some questions (Spellbooks and abilities)

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Hi.

Right now, I have some questions about spellbooks and abilities... and I hope that you can answer them.
1 - I have read some posts and tutorials about spellbooks, but I still don't understand them clearly... Someone can explain WHAT they exactly are. I think that they are some kind of abilities used to store other abilities, but I'm not sure. (I can't even try to make one if I don't even understand what is it used for...)
2 - I had an idea to make a item system in my proyect, but I'm not sure about how to do it. Whenever the hero picks up an item, for example, a potion; the item won't be stored in the hero's inventory, it will be destroyed, and a variable named "Potions" will increase it's value by 1. Then, whenever the hero uses an ability named "Potion", the variable's value will decrease by 1. I mean, the variable indicates the number of potions the player has, and they will be used trough an ability. Good, this is not hard. But I'm not sure about how to make the hero unable to cast this ability if the variable's value is 0.

I hope you understand what I'm trying to ask. Thanks for reading.

Regards
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
#1
You are absolutely correct about thinking that Spell Book is just a spell, that holds abilities in it, simple as that, right ?
Well, the execution is pretty simple but it's up to the creator to make it more unique
Well, by default, a unit can have a total up to 8 abilities: http://www.wc3c.net/attachment.php?attachmentid=14798&stc=1&d=1162023702 after having some alterations to the unit's command: http://www.wc3c.net/showthread.php?p=859119
Well, if you want more than that, Spell Book is the great choice to solve your problem
SB can hold up to 11 abilities (including ESC button) and the best part is: A Spell Book can be within a Spell Book
Meaning that inside a Spell Book, you can have another Spell Book which give you kind of unlimited amount of abilities that you can hold

Spell Book also can hold passive abilities, just add passive abilities to a Spell Book and add the Spell Book to a unit
Then, at Trigger Editor, use this function:

  • Player - Disable Spell Book for Player 1 (Red)
This will make the Spell Book to not appear on the unit's User Interface (Player 1 only since the trigger refer to Player 1 only, you can loop this action to do for all players) but the passive abilities are there, you can benefit slots from this

#2
Well, you can use a simple MPI system for this, I'll show you in the test map below.
 

Attachments

  • Simple Potion System.w3x
    16.2 KB · Views: 48
Level 9
Joined
Apr 19, 2011
Messages
447
Thanks for answering.

1 - I'm glad I was right about this. I will read some more tutorials, and will try to make my own spellbooks then.
2 - The test map was very useful. I understand the system, it was much more easier than I thought xD.

Thank you for all your help!

Regards
 
Status
Not open for further replies.
Top