Help with skill =/

Zorobay

Member
Reaction score
1
Hi,

I'm making a TD, and i have a tower that should represent Heimerdinger from LoL.

He has a skill where he spawns one, or two (if skill lvl >2) turrets (buildings). I have a trigger that prevents him from having more than two turrets active if the skill lvl is 3 or more. This trigger also removes the first turret he built if he tries to build a third one, and then builds the third one...hope you understand. The problem with this skill is that i store the turrets in a unit variable. This variable has two arrays, one for the first turret and one for the seconds. This works fine...as long as there is only ONE heimerdinger on the map =( If I build more than one, the onther heimers turrets begins to dissappear >.<

Is it possible to make a better version with triggers, or is there a skill that i can use that only allows him to have 1 or two turrets built?

TY!
 

Inflicted

Currently inactive
Reaction score
63
Firstly. Heimer is awesome. Total Fan.

And yeah try maybe having two unit arrays[]. One for each, like Turrets1[12] and Turrets2[12]. It wouldn't be appropriate if say there were 10 turrets. But for only two this is ok.
Although your triggers may not adjust perfectly.

This should be easy enough to make MPI.

I believe a Summon Ability like Feral Spirit or something only allowed it to be spawned once. And if you recast it, it removed the previous summons. However these were both spawned at the same time. So it's not the same as Heimer's selection.

About improving your trigger, we would need to see it first.
 

Zorobay

Member
Reaction score
1
Firstly. Heimer is awesome. Total Fan.

And yeah try maybe having two unit arrays[]. One for each, like Turrets1[12] and Turrets2[12]. It wouldn't be appropriate if say there were 10 turrets. But for only two this is ok.
Although your triggers may not adjust perfectly.

This should be easy enough to make MPI.

I believe a Summon Ability like Feral Spirit or something only allowed it to be spawned once. And if you recast it, it removed the previous summons. However these were both spawned at the same time. So it's not the same as Heimer's selection.

About improving your trigger, we would need to see it first.

Code:
Ya hmm i could use those arrays. The problem is that there can still only be 1 Heimer per player unless i make 24 variables with 12 arrays each >.<

code heimer turret lvl 1-2:
H28G Evolution Turret lvl 12
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to H-28G Evolution Turret (Heimerdinger)
        (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Less than 3
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Equal to 1
            Then - Actions
                Unit - Create 1 H-28G Evolution Turret lvl 1 (Level 1 H-28G Evolution Turret) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Equal to 2
                    Then - Actions
                        Unit - Create 1 H-28G Evolution Turret lvl 2 (Level 2 H-28G Evolution Turret) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
                    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                unitThisLevelTurrets[1] Equal to No unit
            Then - Actions
                Set unitThisLevelTurrets[1] = (Last created unit)
            Else - Actions
                Special Effect - Create a special effect at (Position of unitThisLevelTurrets[1]) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                Unit - Remove unitThisLevelTurrets[1] from the game
                Set unitThisLevelTurrets[1] = (Last created unit)
'


level 3-5

Code:
H28G Evolution Turret lvl 345
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to H-28G Evolution Turret (Heimerdinger)
        (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Greater than 2
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Equal to 3
            Then - Actions
                Unit - Create 1 H-28G Evolution Turret lvl 3 (Level 2 H-28G Evolution Turret) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Equal to 4
                    Then - Actions
                        Unit - Create 1 H-28G Evolution Turret lvl 4 (Level 2 H-28G Evolution Turret) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of H-28G Evolution Turret (Heimerdinger) for (Casting unit)) Equal to 5
                            Then - Actions
                                Unit - Create 1 H-28G Evolution Turret lvl 5 (Level 2 H-28G Evolution Turret) for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
                            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                unitThisLevelTurrets[1] Equal to No unit
            Then - Actions
                Set unitThisLevelTurrets[1] = (Last created unit)
            Else - Actions
                Special Effect - Create a special effect at (Position of unitThisLevelTurrets[2]) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                Unit - Remove unitThisLevelTurrets[2] from the game
                Set unitThisLevelTurrets[2] = unitThisLevelTurrets[1]
                Set unitThisLevelTurrets[1] = (Last created unit)
 

jnZ

I
Reaction score
64
to be honest, i didn't take the time to read the whole thread. but the problem is to refer to up to 2 turrets per heimerdinger via unique variables right?

you could do this by refering to custom values

Everytime you create a heimerdinger set its custom value to HeimerDingerIndex (Integer variable that starts at 0)
and set HeimerDingerIndex to HeimerDingerIndex + 2 afterwards.
when refering to his turrets set the first turret to HeimerDingerTurret[CustomValueOf(Heimerdinger)] and the second to HeimerDingerTurret[CustomValueOf(Heimerdinger) + 1]

i hope you get what i'am trying to say. like that every heimerdinger has a unique index (the first heimer has 0, the second has 2, the third has 4,...)
and their turrets are unique variables (heimerdinger 0(turret 0 and 1) heimerdinger 1(trurret 2 and 3), heimerdinger 3(turret 4 and 5), ....)
 

Zorobay

Member
Reaction score
1
to be honest, i didn't take the time to read the whole thread. but the problem is to refer to up to 2 turrets per heimerdinger via unique variables right?

you could do this by refering to custom values

Everytime you create a heimerdinger set its custom value to HeimerDingerIndex (Integer variable that starts at 0)
and set HeimerDingerIndex to HeimerDingerIndex + 2 afterwards.
when refering to his turrets set the first turret to HeimerDingerTurret[CustomValueOf(Heimerdinger)] and the second to HeimerDingerTurret[CustomValueOf(Heimerdinger) + 1]

i hope you get what i'am trying to say. like that every heimerdinger has a unique index (the first heimer has 0, the second has 2, the third has 4,...)
and their turrets are unique variables (heimerdinger 0(turret 0 and 1) heimerdinger 1(trurret 2 and 3), heimerdinger 3(turret 4 and 5), ....)

Huh, smart! There is one problem though. The custom values are used to as the amount of money you get when you sell a tower...hmm. I guess that i could make an exception for Heimerdinger...

TY!

Edit: Or wait...is point value and custom value the same thing?
Edit: Found out that is wasn't! How wonderful, then your trigger should work! TY!
 

Inflicted

Currently inactive
Reaction score
63
Code:
Ya hmm i could use those arrays. The problem is that there can still only be 1 Heimer per player unless i make 24 variables with 12 arrays each >.<

This should be easy enough to make MPI.
Apologies, I didn't realise it needed to be MUI.

Point Value is a preset value that's set in the Object Editor. More convenient for sell values as it is constant for each unit of that type.
Custom value is unique to each unit. It must be set via triggers.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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