Jump to content


Photo

Fire Arrows in Arrow Tower Expansion (From Wall Segment) & Multiple Comandsets


  • Please log in to reply
No replies to this topic

#1 malvack

malvack
  • Members
  • 36 posts

Posted 12 June 2017 - 04:39 AM

Hi everyone, so I have to small problems which I guess I can live without solving them, but I haven't found the answer to them.

 

So the first one should be pretty easy, but for some reason doesn't work. So I have this hero that at Level 7 upgrades all trebuchets to have fire stones, including the ones of the wall turrets (the ones you get after purchasing the trebuchet upgrade at a wall segment). He does the same for every structure that shoots arrows as a defense mechanism, like the barracks at level 3, and gives them Fire Arrows. The way he does this is by creating a ping that has a leadership-ish behavior that sends fire arrows and fire stones to the respective recipients. Here's the code:

    Behavior = PassiveAreaEffectBehavior ModuleTag_GiveUpgrade_GondorFireArrows
        EffectRadius    = 10000000
        PingDelay       = 2000
        ModifierName    = GiveUpgrade_GondorFireArrows
        AllowFilter     = NONE +GondorForge +GondorBarracks +GondorArcherRange +GondorFarm +GondorSentryTower_Independant +GondorCastleWallTower ALLIES
    End

This works for every other unit as well, and obviously, GiveUpgrade_GondorFireArrows is an attribute modifier that grants the Fire Arrows upgrade. It works perfectly, except for GondorCastleWallTower, i.e. the tower expansion. I then went to find the weapon of the expansion and it should change the projectile after recieving the fire arrows upgrade, but it doesn't. I decided to bypass this and change the weapon after recieving the upgrade via a WeaponSetUpgrade, but it doesn't work. 

 

The weirdest part is that the trebuchet expansion works just fine, but the arrow tower doesn't. It is as if the tower expansion isn't GondorCastleWallTower, but as far as I can tell, that IS the object.

 

 

-------------------------------------------------------------------

 

Now, for issue #2

 

Again, I have kinda solved this one a while back, but I want to change it. Basically, I have a hero with 3 commandsets, the way I solved this was with childObjects. However, I was wondering if I could do it with the weapon toggle monitor. I have many heroes that use that, and others that use the mount toggle to achieve the same, but all of those heroes have only 2 commandsets.

 

So, my question is as follows: Is there a way to have 3 commandsets in a unit, without using childobjects?

 

My only guess so far is to use both weapon toggle and mount. The only problem I see there is that appareantly there's a priority with commandset toggles, and after doing some experiments, the mounted toggle doesn't even appear in the hero.

 

As I said, I guess that I could work with childobjects, but it feels kinda weird creating a whole object just to have it use a different commandset.

 

I wouldn't mind to use a porter-like commandset to have more room to work with. My hero has 12 powers, and 4 of them are just for spawning structures. The only problem I have is that I don't know how to code it :S I've tried using the DOZER kindof, but it doesn't work. Also, I don't know if the commandbutton should be of special power type, or how would that interact with the rest of the code.

 

Any help would be profoundly appreatiated. And if you have read this far, thank you =)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users