I need some help with an ability I'm trying to create

I

Inkursus

Guest
I'm trying to make an ability for a hero, and I'm having a lot of problems with it. The ability will cause the hero to "mimic" another hero and turn into the target hero for a set amount of time, like 20 seconds (for example, if mimic was used on a paladin, the hero would turn into a paladin). From my knowledge, there's no base ability similiar to this that I cna copy, so I tried using triggers.

Basically what I have now is a trigger set up that recognizes the ability being cast, and then creates the target hero type unit at the casting unit. It then moves the casting unit off-map. After 20 seconds, it removes the created unit and moves the original hero back. This however, does not work well. It is very buggy, often doesn't work, and looks very messy. Though the "replace unit" effect would work better, the original hero loses all abilities and levels.

Does anyone have any ideas on how I can get this working?
 
If you save the original hero as a variable, does it still lose all abilities/levels when you use replace unit?
 
Cres, I want to make a new trigger. What I have right now is just a mess.
 
If I save the hero as a variable, the hero still retains the level and abilities. However, the hero always returns with full health, mana, and with no cooldowns. This would allow the hero to continuously cast the mimic ability (it's intended to be a 60 second cooldown).
 
Well, you can store the health and mana integers as variables too, but I don't know how you can change the cooldown of that particular spell. Sorry =\
 
change the cool down in the object editor, in abilities. as for a trigger, heres one:

Code:
Events: A unit casts an ability
Conditions: Ability equal to mimmic
Actions: Set variable Life[Player number of owner of triggering unit] equal to life of triggering unit
           Set variable Manna[Player number of owner of triggering unit] equal to manna of triggering unit
           Set variable Hero[Player number of owner of triggering unit] equal to triggering unit
           Replace triggering unit with targeted unit
           Start mimmic_timer[Player number of owner of triggering unit] as a oneshot timer that will expire in 20 seconds
           Set variable mimmicer equal to number of owner of triggering unit
           Set variable mimmic_victom[Player number of owner of trigggering unit] equal to targetted unit


and the get it back trigger:

Code:
Events: mimmic_timer expires
Conditions:
Actions: Replace mimmic_victom[mimmicer] with hero[mimmicer
            Set life of last created unit equal to Life[mimmicer]
            Set manna of last created unit equal to Manna[mimmicer]


i doubt if it will work, but its worth a trie.....

hope that helped,
Pyromancer
 
why not just set the life/mana of the unit the same as what the mimic has beofer it expires, this prevents "exploiting" the free mimic (like suicide runs) and for cooldowns, it shouldnt be much of a problem as long as you timer it (like start the timer after they cast, removing the ability, then when the timer runs out, restoring it to the hero. A bit crude but it works)
 
Maybe something like:

hide hero
pause hero
add ability "invulnerable"
create unit-type of targeted unit at position of hero
wait
remove "invulnerable"
unpause hero
unhide hero
move hero to position of mimic
 
Thanks for all of the help, I got it working now. The only problem left is that when a hero dies, they are revived back at the base. When the unit mimics and turns into another hero and dies as that hero, the player doesn't get the mimicer back, they get the victim. Any solutions besides making him invulnerable? :p
 
I'm not sure how to do what I'm about to say, but it might be better to have the caster of mimmic metamorphosise into the targeted unit. That way when the hero dies as that unit they should still count as the original hero and respawn. But like I said I'm not sure how to do that.
 
Mabe something like,

E: Unit - A unit dies
C: Unit- (Triggering unit) Equal to (Mimicer <gen>)
A: Unit- Revive (Trigering unit)
Trigger - Run (Mimicer Return <gen>)
Wait- (0.01) Gametime seconds
Unit- Kill (Trigering Unit)

I did this freehand so it might be a little scratchy, and I did this assuming that in the trigger that makes him turn back to his actual form uses
Unit- Replace (Mimicer_Target_form <gen>) with unit (actual form)

otherwise you would have to do something else
 
i have seen a spell in wc3sear.ch that does what you exactly need i dunt remember its name it has done by a person called vexorian(or wexorian) i remember take some time there you may find it at spells section
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Today I had to scramble, I didn't work most of dinner service and no one told me shit. They had a rough few hours lol
  • Varine Varine:
    I have two salmon, Sockeye and Atlantic. Atlantic is used for the kids salmon and the salmon and beet salad, and can also be added onto any dish or just as a side. Atlantic salmon will almost exclusively ever be FARMED, as it is endangered in the wild, and we ALWAYS cut them to 4 ounces.
  • Varine Varine:
    SOCKEYE salmon, very different and this IS wild caught. We have an ENTREE version, and an add on version. The entree is 7 ounces, the add on is 4. Why? Because that is how someone that wasn't me set up the computer.
  • Varine Varine:
    I had to have this conversation like ten fucking times tonight
  • Varine Varine:
    The issue being, I came into work and had none of this whatsoever
  • Varine Varine:
    No one told me shit
  • Varine Varine:
    So, taking into consideration that what I typed out up there is kind of some fucking nonsense that under normal circumstances no one really needs to fucking be able to explain in any rational way
  • Varine Varine:
    Let alone trying to figure it out from a wildly stressed out me that is also on a phone call trying to get something to show up from Seattle tomorrow while trying to explain this salmon situation, that also is barely solved in maybe a few hours and and but I am bulking it with a few steelhead filets I have and that is a WHOLE fucking different thing to the 19 year old server that got put on day shift C crew that doesn't know who I am.
  • Varine Varine:
    I did however really want days. I like getting off at 4 half the time, and that makes it worth it!
  • Varine Varine:
    Also I hate my job right now but I think that was the hard part. Now it's just work
  • Varine Varine:
    @jonas I'm sorry? I don't know what you're referring to.
  • Varine Varine:
    Once we hit winter I feel like I get to back to having a pretty cool job. Like I bitch about it all the time, but it's work. I'm still gonna bitch
  • Varine Varine:
    All in all though I think this summer is going really well. Some complicated things, but at the end of the day it isn't THAT big of a deal. Not all of our servers have quite realized they are technically sales
  • Varine Varine:
    Like yeah it is a substitute, but FOMO. Chef isn't getting this again this year, he has to figure it out, so it's slightly off on the menu, but that is more or less the LOWEST quality and price. Right now, steelhead is a real stealhear, right?
  • Varine Varine:
    Like fuck off even I can do it
  • Varine Varine:
    I am going to get one of my servers to do that in her server voice and you'll see my point
  • Varine Varine:
    Maybe the bartender. Idk, it's one of my favorite things to hear them go from calm to customer service voice. They will translate it to like "The chef is trying to change that a bit right now so he does have a Alaskan river steelhead. Yeah like the one you might fish probably!" And then the girls can bat their eyes and do pretty girl server shit
  • Varine Varine:
    At least that's how imagine some of them. Did you know mayonnaise is dairy free? A suprisingly amount of people don't\
  • The Helper The Helper:
    mayo is eggs right?
  • The Helper The Helper:
    Seems I never watched the Witcher - looks like i have a lot of content
  • The Helper The Helper:
    Season 1 Episode 8 the marathon continues...
  • jonas jonas:
    mayo is eggs & oil
    +1
  • The Helper The Helper:
    I got halfway season 2 on The Witcher and it lost me. I am going to have to pick this one up again later.
  • jonas jonas:
    season 2 is with the new actor right? it's so far below the first one
  • The Helper The Helper:
    first season was good the 2nd season is bleh I hope I can make it through it for 3

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top