HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

ok! can anyone tell me how to...

11-21-2004, 07:00 PM#1
lvguy2288
OKays i am making an rpg for my brother cousin friend and I. just a nice little 4 character one but i want to make it advanced. Can anyone tell me the trigger to do this....

Hero is within vicinity of "Ability Shop". Hero buys firebolt. Hero Learns Firebolt. Hero goes back to shop and buys firebolt again. Hero learns firebolt level 2. I tried to contact owner of a map with this trigger but they like live on the moon. I just want the players character to be able to customize their abilities. So i could have like 25 abilities to choose from and the wizard or whatever gets 5 of the ones he wants making game a little more fun. I tried using like hero aquires item, give hero ability but it never worked. all it did was make the item hero aquired have that ability :( thanks in advance!

Also! i have problem with importing the skins! I download the skin then unzip and import it through manager. Then i run the path and the skin never changes :( do i have to do something else or am i just getting wrong path! :(
11-21-2004, 08:42 PM#2
HEZZA
Easy as 1 2 3 ...wait a bit longer if u will im going to release a map full of these ability triggers where you can buy them and they lvl up etc...its simple just so everyone doesnt have to write the triggers ! saves time.

in the mean time.

Event: unit - use's an item

Condtion : Item being manipulated = Tome of Bash
level of ability for (hero manniuplating item) not equal to 3

actions:

If then else or/and multiple actions
- if -
Item being manipulated = Tome of Bash
level of ability for (hero manniuplating item equal to 0)

-actions-
ability - Add Bash to hero maniluplating item

If then else or/and multiple actions
- if -
Item being manipulated = Tome of Bash
level of ability for (hero manniuplating item equal to 1)

-actions-
set - level of bash for unit (hero manilpulating time to 2)

If then else or/and multiple actions
- if -
Item being manipulated = Tome of Bash
level of ability for (hero manniuplating item equal to 2)

-actions-
set - level of bash for unit (hero manilpulating time to 3)



EDIT: heres the code i use for this bash ability (lets see how good my memory is ^_^ )
Code:
Bash
    Events
        Unit - A unit Acquires an item
    Conditions
        (Level of Bash for (Hero manipulating item)) Not equal to 3
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Tome of Bash
                (Level of Bash for (Hero manipulating item)) Equal to 0
            Then - Actions
                Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
                Unit - Add Bash to (Hero manipulating item)
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Tome of Bash
                (Level of Bash for (Hero manipulating item)) Equal to 1
            Then - Actions
                Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
                Unit - Set Level of Bash for (Hero manipulating item) to 2
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Tome of Bash
                (Level of Bash for (Hero manipulating item)) Equal to 2
            Then - Actions
                Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
                Unit - Set Level of Bash for (Hero manipulating item) to 3
                Skip remaining actions
            Else - Actions
11-21-2004, 09:42 PM#3
lvguy2288
ok thanks alot, was taking me forever to figure this out and its a really nice feature. Gives people opprotunity to be different every time.
11-21-2004, 10:37 PM#4
Anitarf
Quote:
Originally Posted by lvguy2288
ok thanks alot, was taking me forever to figure this out and its a really nice feature. Gives people opprotunity to be different every time.
Gives people the opportunity to take 5 stun/nuke spells and be imbalanced every time.

Sorry, couldn't resist it. :)

Anyway, to stay on topic, you can optimize this trigger further easily, and it will be loads of help if you intend to have more than 3 levels per each spell. All you do is replace this part (which would be insanely long if the spells had like 10 levels):

Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Tome of Bash
                (Level of Bash for (Hero manipulating item)) Equal to 1
            Then - Actions
                Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
                Unit - Set Level of Bash for (Hero manipulating item) to 2
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Tome of Bash
                (Level of Bash for (Hero manipulating item)) Equal to 2
            Then - Actions
                Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
                Unit - Set Level of Bash for (Hero manipulating item) to 3
                Skip remaining actions
            Else - Actions
And replace it with this:
Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Tome of Bash
                (Level of Bash for (Hero manipulating item)) Greater than 0
            Then - Actions
                Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
                Unit - Set Level of Bash for (Hero manipulating item) to ((Level of Bash for (Hero manipulating item)) + 1)
                Skip remaining actions
            Else - Actions

Oh, and you can move the following line from the if-then-else directly to the trigger conditions:
Code:
                (Level of Bash for (Hero manipulating item)) Greater than 0

And another thing, because the trigger conditions only allow the trigger to run if the bash isn't at max level yet, and the first if-then-else already skips all remaining actions if the bash is at level 0, you don't actually need the if-then-else I posted above to be an If-then-else. You can just put the actions in directly.

And don't forget to destroy special effects to avoid memory leaks. That's probably not that critical here, as the spells are learned only a few times each time you play, but if the special effect you use is the kind that can be destroyed right away (many models still play out their animation before dissapearing, even if they are destroyed the moment they are created), then why not destroy it, it's so simple.

Anyway, here's where HEZZA's trigger is after I would optimize it:

Code:
Bash
    Events
        Unit - A unit Acquires an item
    Conditions
        (Level of Bash for (Hero manipulating item)) Not equal to (maxBashLevel)
        (Item-type of (Item being manipulated)) Equal to Tome of Bash
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Bash for (Hero manipulating item)) Equal to 0
            Then - Actions
                Unit - Add Bash to (Hero manipulating item)
            Else - Actions
                Unit - Set Level of Bash for (Hero manipulating item) to ((Level of Bash for (Hero manipulating item)) + 1)
        Quest - Display to (All players) the New Item Received message: (Name of (Item being manipulated))
        Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
        Special Effect - Destroy last created special effect
11-21-2004, 10:48 PM#5
HEZZA
mmm yeah thats going into detail....im presuming he only wanted the lvl 3 bash ability...but hey....

and lvguy2288: yes it is good at creating very imba heroes :)