• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Swap Hero Help (not abillty)

Status
Not open for further replies.
Level 1
Joined
Oct 25, 2007
Messages
5
Hello,

First of all i know this is my first post.
It's nice to read all your posts (some aren't very smart there always asking the same question. maby mine is a frequently asked question to :) )

I was searching for an tutorial for swapping units i found some tutorials but those were for swapping units with a skill like Blink.
i don't want that i want to swap heroes like in X Hero siege 3.23 Double Hero Mode. http://www.epicwar.com/maps/12364/
it works different there. If u have 2 heroes and press F1(to select the first hero) u will get your first hero in the field. if you press F2(to select your second) [these are default buttons of WC3FT] your second hero will come in the field and your first will go to a place where he can't do anything because if u sellect the other hero he will come in the field again.
i want that to.
if u don't understand what i'm saying (my english isn't that good :p) then please try that map out.

So i'm wondering if someone can help me with that like an tutorial or just a simple post (not to simple ofcourse :O) and if it's in jass it's fine to (but i don't understand that realy good)


Thanks for your time and i hope you guys can help me.
if u can thank you so much! (i'm already searching like 3 weeks for it.)
 
Last edited:

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Welcome to the Hive Workshop, Kuniyo. If you want to introduce yourself to the Community, you may do so here. If not, you should at least read the important Site Rules, to make sure you won't run in trouble.


There is an event that detects when a key is pressed (I'm not sure if F1, F2, etc are available in Triggers, but you may check). You need only use that event (if it exists), use some conditions and use certain actions such as Move Instantly To, Pause, etc. Ask for details if you wish.

PS. - Spell/system-creation threads go on the Spells and Systems forum.
~Thread Moved
 
Level 1
Joined
Oct 25, 2007
Messages
5
no it's not just with the F1 and F2 Button it's when u select the other hero (the 1 that's not in the fighting field) then they will swap.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
I dont answer because its stupid and little long
hmm you could do that if you know variables or regions
unless you dont it would be useless to trying to help you with your question

You need very detailed instant messenger help

Anyway I will try

You need a region for this that contains waiting units
And Players must have only 2 heroes
it gets creepy for more heroes
Replace <Waiting Region> with region you use


  • Hero Swap
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Triggering player)
      • (<Waiting Region> contains (Triggering unit)) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Not equal to (Picked unit)
            • Then - Actions
              • Unit - Move (Triggering unit) instantly to (Position of (Picked unit))
              • Unit - Unpause (Triggering unit)
              • Unit - Move (Picked unit) instantly to (Center of (<Waiting Region>)
              • Unit - Pause (Picked unit)
            • Else - Actions
 
Level 1
Joined
Oct 25, 2007
Messages
5
Thanks man ill try that and ill tell you if it worked.

EDIT--->:
I found all the triggers when i tried it both my heroes got in the waiting zone and they couldn't do anything :) ill try to change some stuff and tell you if it worked.

so far it didn't work but i'm still trying :)

EDIT--->: i can't figure it out i'm sorry >.<
if someone else can try to help to it would be realy nice
 
Last edited:
Level 1
Joined
Oct 25, 2007
Messages
5
Thanks for trying to help.
it didn't work for me but maby someone else can figure it out anyway i have a different way for the heroes now.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Ups sorry

  • (Triggering unit) Not equal to (Picked unit)
Should be
  • (Triggering unit) Not equal to (Picked unit)
  • (<Waiting Region>) contains (Picked unit)) Equal to False
(its in the booleans Unit - Unit In Region)

And other hero must be in waiting region so put it there in initialization and disable it
 
Last edited:
Status
Not open for further replies.
Top