My friend and I are making a Starcraft equivalent of Pixel Junk Monsters and we're trying to implement the "If you stand on top of a tower, do an animation, then level an experience bar" aspect of it. We can do the triggers for any one specific instance of a tower just fine, but how do you generalize the conditions to be for all structures (or psionic, biological, etc.)?
I was also wondering how difficult it'd be to make a vertical exp bar appear when you stood on it? We're just adding energy to the tower at the moment, and when it gets to 100 energy, it upgrades. Can that be handled more elegantly?
I'm not too experienced with animations, but for the dancing stuff, you could either create a trigger with a "unit enter/leave range of unit" for each of your towers, and when they enter within range, apply a "behavior - buff" to that unit. Likewise, if they leave then remove the buff. As for the buff, make it do nothing and act as a dummy. Let's call it "Dummy Buff" for now. Check its flag to be hidden so it isn't an eyesore. The alternative is to give the towers an aura ability that also applies this dummy buff.
For the animation part, in the actor of the unit, edit its events. Add "behavior "Dummy Buff" is created" and set its action to play your animation. I'm not sure if choosing "behavior "Dummy Buff" is on" would work better.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
My friend and I are making a Starcraft equivalent of Pixel Junk Monsters and we're trying to implement the "If you stand on top of a tower, do an animation, then level an experience bar" aspect of it. We can do the triggers for any one specific instance of a tower just fine, but how do you generalize the conditions to be for all structures (or psionic, biological, etc.)?
I was also wondering how difficult it'd be to make a vertical exp bar appear when you stood on it? We're just adding energy to the tower at the moment, and when it gets to 100 energy, it upgrades. Can that be handled more elegantly?
I'm not too experienced with animations, but for the dancing stuff, you could either create a trigger with a "unit enter/leave range of unit" for each of your towers, and when they enter within range, apply a "behavior - buff" to that unit. Likewise, if they leave then remove the buff. As for the buff, make it do nothing and act as a dummy. Let's call it "Dummy Buff" for now. Check its flag to be hidden so it isn't an eyesore. The alternative is to give the towers an aura ability that also applies this dummy buff.
For the animation part, in the actor of the unit, edit its events. Add "behavior "Dummy Buff" is created" and set its action to play your animation. I'm not sure if choosing "behavior "Dummy Buff" is on" would work better.