Shadow Orb Ability?

A

abishai

Guest
You guys remember the Nelf mission in TFT where Naiev was going all over the sunken ruins chasing Illidan, while acquiring those Shadow Orb fragments?

Basically, when she picked up the first "fragment" she got "Shadow Orb Level 1" which gave a small bonus. Every time she picked up another "fragment" her Orb became Level 2, and gave a slightly larger bonus.

I've messed around with the world editor off and on for a few years and I'm just starting to get into trigger editing. I've searched this forum for a while and haven't seen anyone outline exactly the trigger I'm looking for. What I want is a trigger that will allow the heros in my map to have advancing items.

I'm going to make 6 items that will rank up every time another fragment is acquired. I'll obviously have to make each of those individual items in the editor, but how do I set the trigger to replace an item upon the acquisition of a de-spawning item like the standard "Shadow Orb Fragment" in the editor?


ps. I'm really glad I found this site, I'm a terrible noob right now, and I just haven't been able to find what exactly I'm looking for. Thanks guys!
 

Lobster

Old Fogey ofthe site
Reaction score
90
i think you have to remove the item and add the next item.

Make sure you put the item in a variable
 
A

abishai

Guest
crap...

I'm cringing to admit I don't know this, because I spent the last hour trying to copy the example I found on this site of combining the DotA items to make the Stygian Desolator, but here it goes...

How do I put the item in a variable? I'm really struggling here. Thanks for your help Lobster.
 

Lobster

Old Fogey ofthe site
Reaction score
90
You dont need to combine the items.
Variables needed include:
Shadow orb(integer)
Shadow orb item(real: array= total number of fragments)

Code:
Event: Unit aquires item
Condition: Item type of item being munipulated = shadow orb
Action:
 Set Shadow orb integer = (shadow orb integer +1)
Remove Item of type: Shadow orb(Shadow orb item(Shadow orb integer-1)From unit aquiring item
Give unit manipulating item (Shadow orb item(Shadow orb integer)
I think this shoulld work.
 
A

abishai

Guest
more questions

A few more newb questions:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Orb of Burning Arcanum Fragment
    Actions
        Set Orbofburningarcanum = (Orbofburningarcanum + 1)
        Item - Remove (Item carried by (Triggering unit) of type (Item-type of Orbofburningarcanumlevel[(Orbofburningarcanum - 1)]))
        Hero - Give Orbofburningarcanumlevel[Orbofburningarcanum] to (Triggering unit)

I've got "orbofburningarcanum" as my integer and "orbofburningarcanumlevel" as my "item (real: array= total number of fragments)" like you said.

I've got 35 fragments in the campaign (only 1 actual item, modeled after the "shadow orb fragment" item) that will be picked up and 35 individual items I've made. Am I going to hit a wall because the maximum item level is 10? How should I make it so that they all relate to the appropriate array above?
 
C

Cheddar

Guest
Or, you could do it like:

Unit acquires Orb Fragment
Unit has Shadow Orb 1
Remove Shadow Orb 1
Add Shadow Orb 2

Etc.

It's a bit rough, but I think you get the basics.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
In the game, you only ever find "Shadow Orb Fragment"s.
Which autouses itself, so it never appears on your hero.

The actual Orbs is some triggering like this:
Code:
Orbs Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set Orbs[1] = Shadow Orb +1
        Set Orbs[2] = Shadow Orb +2
        Set Orbs[3] = Shadow Orb +3
        Set Orbs[4] = Shadow Orb +4
        Set Orbs[5] = Shadow Orb +5
        Set Orbs[6] = Shadow Orb +6
        Set Orbs[7] = Shadow Orb +7
        Set Orbs[8] = Shadow Orb +8
        Set Orbs[9] = Shadow Orb +9
        Set Orbs[10] = Shadow Orb +10
Code:
Orbs
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Shadow Orb Fragment
    Actions
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) has an item of type Orbs[(Integer A)]) Equal to True
                    Then - Actions
                        Item - Remove (Item carried by (Triggering unit) of type Orbs[(Integer A)])
                        Hero - Create Orbs[((Integer A) + 1)] and give it to (Triggering unit)
                        Skip remaining actions
                    Else - Actions
        Hero - Create Orbs[1] and give it to (Triggering unit)

Which works just fine, doesn't require any variables (except the item list) and is even multi-unit.

Though, in theory, it would be the same as what you already have.

I don't see what the item level would do here...
 
A

abishai

Guest
AceHart, you're a lifesaver. Just so I can understand how this whole system works (because I'm hoping to be able to do several variations on this with about a dozen items of this type), could you clarify some stuff for me?

The first part of code pasted above is where I tie each real orb (like shadow orb +1) to an integer? So "orbs[1]" becomes an integer for "shadow orb +1"?

This addresses my question above about having 35 levels of an item, doesn't it? The integer relates to the specific item, not the item's level? So I could have this trigger work for as many item levels as I want? must have misunderstood what item levels were for. I thought the integer was refering to *that* instead of the actual item earlier.

Thank you SO MUCH for your help. The map I'm working on is making great progress.
 
Reaction score
107
"orbs" is an item array, the way aceHart did it was he stored each level of the item in the integer slot corresponding to the level of the shadow orb for easy reference.

and also his last line just below 'else' where it goes:

Hero - Create Orbs[1] and give it to (Triggering unit)

should be part of the else function

sorry if my explanation didnt make sense =/
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> and also his last line just below 'else' where it goes:
> Hero - Create Orbs[1] and give it to (Triggering unit)
> should be part of the else function

No, it definitely should not!
It's exactly where it needs to be :p


And, yes, "Orbs" is an array of type "item-type".
With the items in order of importance. Or, from simple to best...

If you get a fragment, the trigger has a look if yes or no you already have one part.
If you do, that item is replaced with the next better one in the list.
If you don't, you get the very first one. (Which is why that last line is all by itself, and also why there is a "skip remaining").
 
A

abishai

Guest
Ok, here's what my triggers look like:
Code:
Burningarcanum Integers
    Events
        Map initialization
    Conditions
    Actions
        Set burningarcanum[1] = Orb of Burning Arcanum
        Set burningarcanum[2] = Orb of Burning Arcanum
        Set burningarcanum[3] = Orb of Burning Arcanum
        Set burningarcanum[4] = Orb of Burning Arcanum
        Set burningarcanum[5] = Orb of Burning Arcanum
(each "orb of burning arcanum" above is different, I just have them all named the same thing in the editor right now)
Code:
Burningarcanum Progression
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Orb of Burning Arcanum Fragment
    Actions
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) has an item of type burningarcanum[(Integer A)]) Equal to True
                    Then - Actions
                        Item - Remove (Item carried by (Triggering unit) of type burningarcanum[(Integer A)])
                        Hero - Create burningarcanum[((Integer A) + 1)] and give it to (Triggering unit)
                        Skip remaining actions
                    Else - Actions
                        Hero - Create burningarcanum[1] and give it to (Triggering unit)

Right now what this trigger does is give my hero 5 level 1 orbs upon acquiring the first fragment. Every fragment I get after that upgrades one of those orbs to level 2... once all 5 of the orbs in my inventory are level 2, the next fragment I pick up gives me a sixth level 1 orb, and upgrades my orb in slot one to level 3.

As I continue to pick them up I increase the rank of one of my orbs by one each time, and start dropping rank 1 orbs on the ground behind me as I pick them up. I must be spawning a ton of them accidentally with the trigger?

All I was hoping for was a single orb or orb upgrade upon acquiring another fragment...
 
Reaction score
107
uh ok lol like aceHart sed [i was wrong] take out the give hero orb lvl 1 in your else function move it outside the "if/then/else"
 
A

abishai

Guest
Code:
Burningarcanum Progression
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Orb of Burning Arcanum Fragment
    Actions
        Hero - Create burningarcanum[1] and give it to (Triggering unit)
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) has an item of type burningarcanum[(Integer A)]) Equal to True
                    Then - Actions
                        Item - Remove (Item carried by (Triggering unit) of type burningarcanum[(Integer A)])
                        Hero - Create burningarcanum[((Integer A) + 1)] and give it to (Triggering unit)
                        Skip remaining actions
                    Else - Actions

What if i can't get it to the bottom of the code? When I add it outside the if/then/else function it sticks itself above the function, and I can't drag it down... Will it work anyway?
 
A

abishai

Guest
Code:
Burningarcanum Progression
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Orb of Burning Arcanum Fragment
    Actions
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) has an item of type burningarcanum[(Integer A)]) Equal to True
                    Then - Actions
                        Item - Remove (Item carried by (Triggering unit) of type burningarcanum[(Integer A)])
                        Hero - Create burningarcanum[((Integer A) + 1)] and give it to (Triggering unit)
                        Skip remaining actions
                    Else - Actions
        Hero - Create burningarcanum[1] and give it to (Triggering unit)

Wait, nevermind I got it down... testing now...
 
A

abishai

Guest
Sorry for the spammed posts above. Trigger is now functioning properly! Thank you so much for all your help guys. I love this forum.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> Trigger is now functioning properly!

Well...

> For each (Integer A) from 1 to 5

You only have five items in your list.
Which means this should only go up to 4.

If you have a look at my original trigger, you may notice I had a list with 10 items,
yet integer A only goes to 9...


And, for futur reference, when moving a trigger line under an "if then else", drop it on the "if".
Or move the "if"... :p
 
A

abishai

Guest
So if I've got an item list with 35, I should only have "For each (Integer A) from 1 to 34"?

And thanks for the heads-up on moving lines... I felt really dumb when I finally got it to work :eek:
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> So if I've got an item list with 35, I should only have "For each (Integer A) from 1 to 34"?

Yes.

In case anyone would wonder why:
- The last item in the list can't be upgraded anyway
- In case there's plenty of those items around, if you pick up the 36th, item 35 will disappear from the Hero and you will not get a new one
 
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