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!
 
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.
 
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)
 
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), ....)
 
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!
 
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.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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