HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Add spells to a spell ingame

10-26-2004, 07:25 PM#1
Linera
How can I have it so player can buy spells from a shop then drop them into a spell book? and have it save those spells in the spell book with character using the save/load code?
10-26-2004, 08:19 PM#2
wwsage
I don't know if you can do things to a spellbook or not, but then again I've never messed with them >_>

About save/loading it kinda depends. If it's singleplayer I'm sure you can use variables to store the spell then save it to the game cache (again never worked with these <_<)

Multiplayer I can't help you
10-26-2004, 08:32 PM#3
xxxSpikexxx
as far as i know you can't just add a spell into a spell book but you can try this:
make an upgrade for each spell that can possibly be in the spellbook and make the spell require the upgrade and research it for the player when he wants to add the spell.
this works easyly with spell scroll items that are only disigned to be added to spell books, so you can make the item activily used and research the upgrade that you name like the spell when the scroll is used.
the player will have all the spell in the spellbook all the time but will see "requires XY" and cant use it untill the "upgrade" is "resarched" by your triggers.

for abilitys that the unit or hero itself has its a bit more difficult... you will have to make some kind of button or abilty or something that the player uses to add a spell into the spellbook and than figure out witch spell it shall be ...

More details would help... do you use the standart hero skill system of wc3? is it even a hero or a unit? Do you want the Guy to have the ability himself AND in a spellbook?

that changes how tricky the triggers will be.