Complex copying spell

kingkwong92

Well-Known Member
Reaction score
25
Hi
I making a very complex spell and I was wondering if you could help me trigger it. (I have no idea how to:nuts:)
My hero has a spell book ability
After he has it, all other heros that use abilities (800 range) that he doesn't have already will be added into the spell book so he can use it.
When he dies all the abilities that he copied disappears.

EDIT!!
One really hard question. How do I add it to the spellbook?
 

mordocai

New Member
Reaction score
17
that sounds very hard but not impossible i think. If you could provide some info about your hero i think it might encourage people to help you:thup:
 

Kazuga

Let the game begin...
Reaction score
110
EDIT!!
One really hard question. How do I add it to the spellbook?
That's the thing, it's impossible to add/remove abilities from a spellbook ingame. You will have to make several spell books with the spells already inside, then when he uses it disable all abilities that ain't with it. Unfortunately there is a limit for how many spells the book can carry, meaning you have to make a lot of spell books to cover all the combinations...
 

Nexor

...
Reaction score
74
But you can add the abilities for the unit without a spellbook, or you could make a spellbook filled with all the possible abilities your map and just enable/disable the abilities for the owner of the hero with this ability
 

Akolyt0r

New Member
Reaction score
33
That's the thing, it's impossible to add/remove abilities from a spellbook ingame. You will have to make several spell books with the spells already inside, then when he uses it disable all abilities that ain't with it. Unfortunately there is a limit for how many spells the book can carry, meaning you have to make a lot of spell books to cover all the combinations...

its not impossible / much easier...check this out:
WC3Campaigns Abilities Tutorial said:
Aspb (Spellbook): The spellbook is basically a container for up to 11 other abilities. It can hold active spells as well as autocast and passive spells and even hero skills. The first wonderful thing about the spellbook is that it gives you the effect of passive abilities in it even if the spellbook ability itself is disabled for the player. So it can be used to hide the icon of whichever passive ability you want and to save slots on the command card. The other wonderful thing is that you can add spells to a spellbook at runtime and remove them again. That is done by giving the unit a second spellbook with the spell that should be added and disabling this second spellbook. That way the skill will show up on the first spellbook but the second one can't be seen on the unit. To make this work both spellbook abilities must have the same base order id. For each skill you want to add at runtime you will need such an adder ability. The third cool thing is that hero abilities in spell books are levelable via the levelup menu. The problem is that they will start at level 1 and not at level 0 if they are in the spellbook from the beginning. That's easy to fix with triggers. Just normally give them to the hero first in the object editor. Then catch when level 1 is learned, remove the skill and add it to the spellbook.

you will need one base (empty?) spellbook and one spellbook for every spell your hero should be able to "copy"
 

kingkwong92

Well-Known Member
Reaction score
25
Info
Only two heros will have this ability
Each player only has one hero
I want the spell to be activated
Drains mana until deactivated
Gains evasion
Certain spells used within range of sight will be added in to the spellbook

I've made a few triggered spells before but this is probably the most complex.
I don't mind making a million spellbooks for the million spells
But I have no idea how to put this all together.
Could someone show me what the trigger would look like?
 

DiFm

New Member
Reaction score
35
So basically similar to the spell in the popular manga naruto. I have allready made one of these I can post triggers later today. But if the hero learns the abilty should he be able to level these abilties up?
 

kingkwong92

Well-Known Member
Reaction score
25
My hero only gets the ability at the level at which it was used and cannot be leveled up. I want only like the first X amount of spells copied. Any spells afterwards overide the older ones. I hope you understand.:eek:
 

DiFm

New Member
Reaction score
35
You need the slots or can you have it without Spellbook would make this easier ^^
 

kingkwong92

Well-Known Member
Reaction score
25
Could you paste that trigger so I can have a look at it?
Might give me an idea on what to do.:thup:
 

Nexor

...
Reaction score
74
First add every spell you want to copy to a spellbook (remember that 11 or 12 is the max number), then do this trigger:

Trigger:
  • Spell copying spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempGroup = (Units within 800.00 of TempLoc matching ((Level of <YOUR_SKILL> for (Matching unit)) Not equal to 0))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Player - Enable (Ability being cast) for (Owner of (Picked unit))
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)
 

kingkwong92

Well-Known Member
Reaction score
25
I just did a bit of research on spellbook. I can't put hero spells into the spell book. So it looks like I'm going to have to make a normal unit spell and a spellbook for every ability that can be copied. I think I will finish my other spells before I do this one. Thanks for all the help everyone:thup:
 

DiFm

New Member
Reaction score
35
How many other spells Should the Hero Have? Is it enough to let the give the hero the abilities without having to use a Dummy spellbooks or normal.

Just modified my old sharingan to fit your needs My old just removed all spells when the unit no longer used sharingan.

*It drains mana per second*
*It removes the spell you have had the longest*
*It works for different players*
*Limited to 4 spells*
*Easy to configure*
*Very annoying and hard to make it MPI though*

The thing is that the spells is directly added to the hero instead of a spellbook.
 

Cloak_Master

Active Member
Reaction score
41
One alternative general idea would to be make an ability that just copies the enemy's ultimates. Would make sense and be alot less work.
 

DiFm

New Member
Reaction score
35
ohh srry forgot about adding it. well I adjusted it some more.


These currents feature.

Pros
*MPI*
*MUI* (works for as many users as the array is set on Unit variables and ability variables "Default 100")
*Easy to configure*
*Unit gets Evasion*
*Drains Mana Each Second*
*All abilities is removed on death*

Cons:
I couldnt fix it to add to a spell book but it works to add directly to the hero. (If somebody knows how maybe they can implent it in this ability.)
I have no idea what would happen if you copy a sill your hero can learn and then learn it. It might mess upp your learning skill I have no idea xD


Setting it up:

All arrays are the same amount of Units you can have that has the ability.
In order to set the limit on maximum spells you have to create or remove a new ability variable with arrays. And also set the remove ability action to that variable. (Default = 4 abilities)

If you want to increase the evasion with each level Just add the action: Set level of abilty for unit of Evasion to lvel of ability sharingan.

The range is set at the set Tempgroup action there you can also change that to have it only work on allies or non hero etc.

At the top where i set sharingan as default you can add all exceptions of spells that shouldn't be able to be learned. (you can remove it since it won't mess up the trigger coz it fails in the " if level of ability is less than 0" action down below It's just set there as default.
 

Attachments

  • Sharingan Permanent.w3x
    23.6 KB · Views: 182
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top