Need help with spell book +rep

TheDarkBoy

New Member
Reaction score
3
Hi. I need a spell book for my heroes. Like the place where you pick your skills. Instead i want it to contain all the heroes spells (Heroes are getting abilities after lv).
Any good ideas or suggestions? Thanks.
EDIT: I also need a trigger to add spells to the spell book, after the level of the hero. Help! ;)
 

xAnaMorphine

Active Member
Reaction score
43
Nice tutorial. +rep for you ;)

Code:
Example
    Ereignisse
        Einheit - A unit gains a level
    Bedingungen
        Or - Any (Conditions) are true
            Bedingungen
                (Unit-type of (Triggering unit)) Gleich Value
    Aktionen
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            'IF'-Bedingungen
                (Hero level of (Triggering unit)) Gleich 3
            'THEN'-Aktionen
                Einheit - Remove Ability from (Triggering unit)
                Einheit - Add Ability to (Triggering unit)
            'ELSE'-Aktionen
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    'IF'-Bedingungen
                        (Hero level of (Triggering unit)) Gleich 6
                    'THEN'-Aktionen
                        Einheit - Remove Ability from (Triggering unit)
                        Einheit - Add Ability to (Triggering unit)
                    'ELSE'-Aktionen
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            'IF'-Bedingungen
                                (Hero level of (Triggering unit)) Gleich 9
                            'THEN'-Aktionen
                                Einheit - Remove Ability from (Triggering unit)
                                Einheit - Add Ability to (Triggering unit)
                            'ELSE'-Aktionen
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    'IF'-Bedingungen
                                        (Hero level of (Triggering unit)) Gleich 13
                                    'THEN'-Aktionen
                                        Einheit - Remove Ability from (Triggering unit)
                                        Einheit - Add Ability to (Triggering unit)
                                    'ELSE'-Aktionen
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            'IF'-Bedingungen
                                                (Hero level of (Triggering unit)) Gleich 17
                                            'THEN'-Aktionen
                                                Einheit - Remove Ability from (Triggering unit)
                                                Einheit - Add Ability to (Triggering unit)
                                            'ELSE'-Aktionen
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    'IF'-Bedingungen
                                                        (Hero level of (Triggering unit)) Gleich 24
                                                    'THEN'-Aktionen
                                                        Einheit - Remove Ability from (Triggering unit)
                                                        Einheit - Add Ability to (Triggering unit)
                                                    'ELSE'-Aktionen
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            'IF'-Bedingungen
                                                                (Hero level of (Triggering unit)) Gleich 32
                                                            'THEN'-Aktionen
                                                                Einheit - Remove Ability from (Triggering unit)
                                                                Einheit - Add Ability to (Triggering unit)
                                                            'ELSE'-Aktionen
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    'IF'-Bedingungen
                                                                        (Hero level of (Triggering unit)) Gleich 40
                                                                    'THEN'-Aktionen
                                                                        Einheit - Remove Ability from (Triggering unit)
                                                                        Einheit - Add Ability to (Triggering unit)
                                                                    'ELSE'-Aktionen
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            'IF'-Bedingungen
                                                                                (Hero level of (Triggering unit)) Gleich 50
                                                                            'THEN'-Aktionen
                                                                                Einheit - Remove Ability from (Triggering unit)
                                                                                Einheit - Add Ability to (Triggering unit)
                                                                            'ELSE'-Aktionen

Then just create a Spellbook based on Hero abillitie containing one Spell wich is learned on level 3 for example. Then create a second Spellbook wich contains 2 spells and add it at the level 6 variable and so on ^_^ (Remove the old one).

EDIT: If you use this in your map, give credits for the spellbook system to the user "login" forgot to mention that, he is really pissed-off when you don't, lol!
 

TheDarkBoy

New Member
Reaction score
3
Code:
Example
    Ereignisse
        Einheit - A unit gains a level
    Bedingungen
        Or - Any (Conditions) are true
            Bedingungen
                (Unit-type of (Triggering unit)) Gleich Value
    Aktionen
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            'IF'-Bedingungen
                (Hero level of (Triggering unit)) Gleich 3
            'THEN'-Aktionen
                Einheit - Remove Ability from (Triggering unit)
                Einheit - Add Ability to (Triggering unit)
            'ELSE'-Aktionen
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    'IF'-Bedingungen
                        (Hero level of (Triggering unit)) Gleich 6
                    'THEN'-Aktionen
                        Einheit - Remove Ability from (Triggering unit)
                        Einheit - Add Ability to (Triggering unit)
                    'ELSE'-Aktionen
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            'IF'-Bedingungen
                                (Hero level of (Triggering unit)) Gleich 9
                            'THEN'-Aktionen
                                Einheit - Remove Ability from (Triggering unit)
                                Einheit - Add Ability to (Triggering unit)
                            'ELSE'-Aktionen
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    'IF'-Bedingungen
                                        (Hero level of (Triggering unit)) Gleich 13
                                    'THEN'-Aktionen
                                        Einheit - Remove Ability from (Triggering unit)
                                        Einheit - Add Ability to (Triggering unit)
                                    'ELSE'-Aktionen
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            'IF'-Bedingungen
                                                (Hero level of (Triggering unit)) Gleich 17
                                            'THEN'-Aktionen
                                                Einheit - Remove Ability from (Triggering unit)
                                                Einheit - Add Ability to (Triggering unit)
                                            'ELSE'-Aktionen
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    'IF'-Bedingungen
                                                        (Hero level of (Triggering unit)) Gleich 24
                                                    'THEN'-Aktionen
                                                        Einheit - Remove Ability from (Triggering unit)
                                                        Einheit - Add Ability to (Triggering unit)
                                                    'ELSE'-Aktionen
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            'IF'-Bedingungen
                                                                (Hero level of (Triggering unit)) Gleich 32
                                                            'THEN'-Aktionen
                                                                Einheit - Remove Ability from (Triggering unit)
                                                                Einheit - Add Ability to (Triggering unit)
                                                            'ELSE'-Aktionen
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    'IF'-Bedingungen
                                                                        (Hero level of (Triggering unit)) Gleich 40
                                                                    'THEN'-Aktionen
                                                                        Einheit - Remove Ability from (Triggering unit)
                                                                        Einheit - Add Ability to (Triggering unit)
                                                                    'ELSE'-Aktionen
                                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            'IF'-Bedingungen
                                                                                (Hero level of (Triggering unit)) Gleich 50
                                                                            'THEN'-Aktionen
                                                                                Einheit - Remove Ability from (Triggering unit)
                                                                                Einheit - Add Ability to (Triggering unit)
                                                                            'ELSE'-Aktionen

Im sorry but that trigger is WAY to complicated (especially because some of it is german) Thank you anyways.
EDIT: But since i really havnt got any response, i might use it. If i do i'll remember to give you +rep :)
 

xAnaMorphine

Active Member
Reaction score
43
Im sorry but that trigger is WAY to complicated (especially because some of it is german) Thank you anyways.

I know some of it is German and I seariously don't bother to translate it but if you tell me that this trigger is way to complicated, you never saw a complicated trigger lol.

It is the easiest way to make a spellbook if you want one like in defi4nc3's orpg.
EDIT: If you want me to translate it I can do so, but only 1 part because the rest is copy+paste :p
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
add all abilitys into the spellbook then use those 2 triggers:
Code:
Abilitys
    Events
        Map initialization
    Conditions
    Actions
        Set Ability[1] = ChainLightning
        Set Ability[5] = Firebolt
        Set Ability[9] = Thunderclap
        Set Ability[12] = Deathcoil
        Set Ability[15] = Earthquake
        Set Ability[20] = ...
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                For each (Integer B) from 1 to 12, do (Actions)
                    Loop - Actions
                        Player - Disable Ability[(Integer A)] for (Player((Integer B)))
The variable Ability[] is an ability variable, the array is the level when your hero can learn them.
the loop actions disable all abilitys for all players, because you have added all abilitys into the spellbook at start.
Code:
Level
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        For each (Integer A) from 1 to (Hero level of (Triggering unit)), do (Actions)
            Loop - Actions
                Player - Enable Ability[(Integer A)] for (Owner of (Triggering unit))
this trigger activates the ability for the owner of the hero again after reaching the right level. i am using the loop for the situation that your hero just gains 2 or more levels at once.

Edit: Maybe this system looks much more complicated as the system posted above but c'mon its looking really cool isnt it?
 

TheDarkBoy

New Member
Reaction score
3
I know some of it is German and I seariously don't bother to translate it but if you tell me that this trigger is way to complicated, you never saw a complicated trigger lol.

It is the easiest way to make a spellbook if you want one like in defi4nc3's orpg.
EDIT: If you want me to translate it I can do so, but only 1 part because the rest is copy+paste :p

I just needed to get started on it :D... it really wasnt that complicated, it just looked complicated ;).. +rep for you
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
@AnaMorphine: That trigger is pretty inefficient and you could use a loop, or even some arrays of some sort.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top