hel pme with control hero

Love-Nature

New Member
Reaction score
7
I just made an ability that controls an enemy hero for a short duration, well i can control it but then i want it to return back to the previous owner, i tried using this but it didnt work

Trigger:
  • Charm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Charm
    • Actions
      • Set CharmCastUnit = (Casting unit)
      • Set CharmTargetUnit = (Target unit of ability being cast)
      • Unit - Change ownership of CharmTargetUnit to (Owner of CharmCastUnit) and Retain color
      • Trigger - Run FloTex Target3 <gen> (checking conditions)
      • Countdown Timer - Start Timer13 as a One-shot timer that will expire in (3.00 + ((Real((Level of Charm for CharmCastUnit))) x 1.00)) seconds


It works
_____________________________________

It doesnt

Trigger:
  • Charm Expire
    • Events
      • Time - Timer13 expires
    • Conditions
    • Actions
      • Unit - Change ownership of CharmCastUnit to (Previous owner) and Retain color
      • Trigger - Run FloTex Target3e2 <gen> (checking conditions)


Also i will have to check if unit is dead during this process while controlled, how to turn it back to previous owner before it revives, so just when it actually dies.

Here i also used CharmTarget Charm Target / CharmCast CharmCast / cast target / target cast etc! omg :(
Unit - Change ownership of CharmCastUnit to (Previous owner) and Retain color
 

gameman

It's been a long, long time.
Reaction score
96
I hope this helps.

Add this in, instead of the "previous owner"
Trigger:
  • Set Charmunitowner = (Owner of CharmTargetUnit)


And as for the death, I belive this would work.
Trigger:
  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to CharmTargetUnit
      • (Elapsed time for Timer13) Less than 10.00
    • Actions
      • Unit - Change ownership of CharmTargetUnit to Charmunitowner and Change color



Forgive me if I am no help, but I am trying.
 

Love-Nature

New Member
Reaction score
7
I hope this helps.

Add this in, instead of the "previous owner"
Trigger:
  • Set Charmunitowner = (Owner of CharmTargetUnit)


And as for the death, I belive this would work.
Trigger:
  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to CharmTargetUnit
      • (Elapsed time for Timer13) Less than 10.00
    • Actions
      • Unit - Change ownership of CharmTargetUnit to Charmunitowner and Change color



Forgive me if I am no help, but I am trying.

I dont understand, what Variable is charmunitowner?
 

gameman

It's been a long, long time.
Reaction score
96
Its the original owner of the unit that you are taking control of.

EDIT:
Trigger:
  • Actions
    • Set CharmCastUnit = (Triggering unit)
    • Set CharmTargetUnit = (Target unit of ability being cast)
    • Set Charmunitowner = (Owner of CharmTargetUnit)
    • Unit - Change ownership of CharmTargetUnit to (Owner of CharmCastUnit) and Change color
 

Love-Nature

New Member
Reaction score
7
Its the original owner of the unit that you are taking control of.

EDIT:
Trigger:
  • Actions
    • Set CharmCastUnit = (Triggering unit)
    • Set CharmTargetUnit = (Target unit of ability being cast)
    • Set Charmunitowner = (Owner of CharmTargetUnit)
    • Unit - Change ownership of CharmTargetUnit to (Owner of CharmCastUnit) and Change color

I still dont know what variable you used for charmunitowner, it isnt Unit varibale.
I cant understand it guys please help :(
 

Bigheaded

New Member
Reaction score
4
I would have thought it would be a "unit" variable, as you're talking about one specific unit.

I am not sure how many of these units are on the field, can multiple charms be active? what happens if the hero dies after it's taken over? this doesn't solve these problems but it will change the target back

Trigger:
  • Charm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Charm
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
      • Wait (3.00 + ((Real((Level of Charm for CharmCastUnit))) x 1.00)) seconds
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Target unit of ability being cast)) and Change color

Any use to you?

edit: just looked at it again and it might not work (sorry, the other ways are probably much better tbh), and i need to go to bed. will look at tommorrow if unsolved.
 

Love-Nature

New Member
Reaction score
7
I would have thought it would be a "unit" variable, as you're talking about one specific unit.

I am not sure how many of these units are on the field, can multiple charms be active? what happens if the hero dies after it's taken over? this doesn't solve these problems but it will change the target back

Trigger:
  • Charm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Charm
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
      • Wait (3.00 + ((Real((Level of Charm for CharmCastUnit))) x 1.00)) seconds
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Target unit of ability being cast)) and Change color

Any use to you?

edit: oh heck, gimme a sec, won't work atm.

Ok but i'd prefer to use Variables and timers, anyways i just need to solve one action, not the whole trigger, there must be a way....

I need to solve this
Trigger:
  • Unit - Change ownership of (Picked unit) to (???) and Change color


Used picked unit because i changed trigger,

this is the one i used because that control might be too op

Trigger:
  • Control
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Control
    • Actions
      • Set ControlPoint = (Target point of ability being cast)
      • Set ControlTarget = (Target unit of ability being cast)
      • Set ControlTriggering = (Triggering unit)
      • Set Temp_Group = (Units within (100.00 + ((Real((Level of Control for ControlTriggering))) x 25.00)) of ControlPoint matching ((((Matching unit) belongs to an enemy of (Owner of ControlTriggering)) Equal to (==) True) and ((((Matching unit) is alive) Equal to (==) True) and
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Owner of ControlTriggering) and Change color
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Countdown Timer - Start Timer12 as a One-shot timer that will expire in (3.00 + ((Real((Level of Control for ControlTriggering))) + 1.00)) seconds


and this for expire

Trigger:
  • Control Expire
    • Events
      • Time - Timer12 expires
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((((Matching unit) belongs to an enemy of (Owner of ControlTriggering)) Equal to (==) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) is A Hero) Equal to (==) False))))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Previous owner) and Change color
      • Custom script: call DestroyGroup(udg_Temp_Group)


The same problem, it controls but doesnt turn back.
 

merlinds

Member
Reaction score
15
Why don`t you save the player number of the owner of the target of the abvility being cast in a Ingeter variable?? isnt it easyer?? the you just load it as a player index!
 

Love-Nature

New Member
Reaction score
7
Why don`t you save the player number of the owner of the target of the abvility being cast in a Ingeter variable?? isnt it easyer?? the you just load it as a player index!

Dude, im not that advanced with the world editor...i just want to fix my problem, may you please focus on it ? :s

Unit - Change ownership of (Picked unit) to (???) and Change color

Nevermind i dont need this anymore, thank you anyways :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top