• 0

    posted a message on Removing unit energy while in Water?

    Blah I'm dumb for not doing that in the first place. Been spending too much time with Actionscript and instances and so on.

    That works perfectly. I'll go poke around the Nexus to see how they make the build bar on hover, and see if I can apply that to a unit. If not, I'lll find a way to force whatever Alt does onto the reaper when it's <100%.

    Cheers all!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Removing unit energy while in Water?

    I had them added to a Unit Group earlier. I feel dumb now having even seen the Set Unit Property thing and it's possibilities. >>

    However, I see a flaw in your plan. It's safe to assume that the player is going to put every reaper into the water at the same time, and get them out as one. However, we know that people will do multiple groups going on in different sections of the map.

    Because of this, won't a Global Var "CurrentEnergy" not work, since each reaper will have it's own energy level? If not, where would the local variable for the reaper go?

    @Eldrazor: I thought about that but it's no good. My entire level is built below 'sealevel' and it's held back by levees of cliff.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Removing unit energy while in Water?

    So I'm trying to add a bit of 'uniqueness' to my first level of my campaign. It's in a very rocky lava filled area with lots of cliffs, so the ideal mode of getting around is Reapers.

    Here's what I want to accomplish:
    1. Give the Reaper a blue-bar (Like Protoss buildings when you hover over them and they are building a unit) when the Reaper is at less than full energy.
    2. Give the Reaper a short-term ability to run 'underwater'. (This will be Lava)
    3. Disable his energy regeneration while he's 'underwater'.
    4. Kill the reaper if he is underwater and his energy runs out.

    What I've accomplished:
    1. Detected when a Reaper enters "water". (Have to use Regions, can't seem to use Water nor a texture underneath the unit :( )
    2. Subtracted energy from him for as long as he stays under water.

    However. Here's the issue I'm running into.
    I can't do a bunch of stuff per-unit. I was originally doing (triggering unit) to set his current Energy, but that doesn't work because it only fires when he enters the region. Because of this, I created another trigger that fires every 1 game second, and it removes his energy. However, now I can't do it per-unit because it's no longer using a region.

    Can anyone just explain the gist of what I need to do to make this work?

    Ps. A way to stop energy regeneration while he's in the region would be nice too. :)

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.