Unit Switching -->Need Pro Help

  • Thread starter Thread starter Dr. Venkman
  • Start date Start date
D

Dr. Venkman

Guest
I need to know how to make triggers and variables that will make it so when my hero casts a specific spell on a neutral or friendly unit it takes control of that unit (and the hero disappears). Then when that neutral or friendly unit thats been taken control of uses a specific ability they revert back to their neutral or friendly status that they had to start with and the hero that disappeared comes back with all of his former stats... health, mana, abilities, etc.

The bigger your explanation on how I would do this the better!
 
I'm thinking use something such as Unholy Frenzy with 0 stats, and set up a trigger to take control of the unit:

Trigger 1
E:
a unit starts the effect of an ability
C:
ability being cast = unholy frenzy
A:
set a variable for caster, such as "Caster"
set a variable for unit being controlled such as "Controlled"
set a variable for owner of "controlled" such as "Original"
"Unit - Change ownership of (Controlled) to (Owner of (Caster)) and Change color"
Hide Caster
(maybe add some special effect for the hiding and something overhead for the unit being controlled)
turn on trigger 2

Trigger 2
E:
a unit starts the effect of an ability
C:
casting unit = Controlled (the variable)
A:
change ownership of (Controlled) to (Original) and change color
show Caster
(maybe you'll want to) move Caster to position of Controlled
turn off this trigger

With that, I think you should get the effect you want. Try it out and let me know.

dArKz
 
Except if the target ability(abilities will be unlearned, level set to 1) is a hero or has any items(they will disappear). To keep these save the unit into a game Cache and then load it. I haven't used game caches so I don't know how to use them off-hand but I can find out.
 
i dont think the hide command works like that, it only makes it so that when you do regen checks with triggers that unit is not picked

I cant get the target of the ability being cast to change ownership for some reason
 
Does anyone know why this is not working

P1 Infect Neutral
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Infect 1
(Owner of (Casting unit)) Equal to Player 1 (Red)
(Owner of (Target unit of ability being cast)) Equal to Player 9 (Gray)
Actions
Set P1Unit = (Triggering unit)
Set P1Infected = (Target unit of ability being cast)
Unit - Remove Wander (Neutral) from P1Infected
Unit - Change ownership of P1Unit to Player 9 (Gray) and Change color
Unit - Move (Triggering unit) instantly to (Random point in WormHolder <gen>)
Unit - Change ownership of P1Infected to (Owner of P1Unit) and Change color
Unit - Add Evacuate Neutral to P1Infected


Player 9 is a computer controlled player with all neutral critters.
P1Unit and P1Infected are both unit variables... The trigger successfully moves my p1unit away and removes control from player1 but doesnt give control of the p1infected unit
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top