How to set a spell in a Spellbook?

Crusher

You can change this now in User CP.
Reaction score
121
Well, I need to set my spell into a spellbook. But, the problem is, the spell is created when hero reaches level 21. So I have no idea how to set it.

Any clue?
 

DragonComple

New Member
Reaction score
1
Well from what i understood is you want to put your spell into the spell book but only when the hero reaches level 21? okay so put that spell into your spellbook. Then do the following

Trigger:
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Disable YourSpell for Player 1 (Red)


Do this for how many players and for whatever spell.
What that will do is even tho your spell is in the spellbook it will not be seen.
Then do . . .

Trigger:
  • Init
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
      • (Hero level of (Leveling Hero)) Equal to 21
      • ((Leveling Hero) is A Hero) Equal to True
    • Actions
      • Player - Enable YourSpell for Player 1 (Red)


So when your unit becomes level 21, it will enable the spell so then the spell will be seen
 

Joccaren

You can change this now in User CP.
Reaction score
54
Event: Unit levels up
Condition: Level of Triggering unit equal to 21
Actions: Add (YourNewSPellBook) to Triggering unit
Set level of (YourNewSpellBook) for triggering unit to level of (YourNormalSpellbook) for triggering unit
Remove (YourNormalSpellbook) from Triggering unit
 

Kahem

New Member
Reaction score
2
Hey man
What you need to do is create your spell and 2 spell books.
The second spell book (spell book 2) holds your spell inside of it, but is a dummy spell book.
IT (spell book 2) MUST HAVE THE SAME BASE ORDER ID AS THE OTHER SPELL BOOK!
When your hero turns 21 (happy birthday!) you add the dummy spell book (2) to it via trigger, and also disable it.
This way the dummy spell book (2) is not seen but because the dummy spell book (2) has the same BASE ORDER ID as the other spell book, the spell u want to add is put in the other spellbook.

Does that help?
ill pass you a demo map if your still stuck, just ask
 

Crusher

You can change this now in User CP.
Reaction score
121
Hmm, it appears that my spell import in a spellbook works, but the problem is: whenever the spell is removed and added later, it adds to main hero spell list!

I want it to add in the spellbook again.

Example of my trigger:

Trigger:
  • Mode 2
    • Events
      • Game - The in-game time of day becomes Equal to 0.00
    • Conditions
      • WeatherModeON Equal to True
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching (((Level of (Matching unit)) Equal to 21) and ((Level of Champion of Strength for (Matching unit)) Greater than 0)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove ACM Strength from (Picked unit)
          • Unit - Remove ACM Strength Buff buff from (Picked unit)
      • Custom script: call DestroyGroup (udg_TempGroup)
      • Environment - Remove Weather
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
      • Set Weather = (Last created weather effect)
      • Environment - Turn Weather On
      • Set TempGroup = (Units in (Playable map area) matching (((Level of (Matching unit)) Equal to 21) and ((Level of Champion of Agility for (Matching unit)) Greater than 0)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Add ACM Agility to (Picked unit)
          • Unit - Add +30 Agility to (Picked unit)
      • Custom script: call DestroyGroup (udg_TempGroup)
      • Sound - Play ArrangedTeamInvitation <gen>
      • Game - Display to (All players) for 10.00 seconds the text: All |c0000ff00Agili...


Also, the buff is not shown (I have set the buff in abilities - example: Agility - added a Agility buff.

Also, there is a problem with removing certain item spell like +30 damage or something..
 

Joccaren

You can change this now in User CP.
Reaction score
54
Try adding the 'Learn Skill for hero' action after your 'Add ACM agility' and 'Add +30 agility' triggers (If your +30 agility is an ability). If the hero doesn't have any skill points to learn these spells with, try the 'Add skillpoints to Hero' action.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top