• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

I need help with hero selection and duel triggers

Status
Not open for further replies.

CHA0S

C

CHA0S

I have searched the forum for a hero selection tutorial....i may have overlooked it...can someone help me with finding one? I would also like a duel trigger tutorial if possible.
 
Hmmmmmmm.... Ive never programmed a hero wars map so i dont know about duelling triggers - however, I can tell you how to do hero selection. Its quite simple :)

First, go into object editor and make your "Choosing Unit" (This is usually a wisp). Remove all its abilities, such as build, harvest, detonate, etc, and you might want to change its name to "spirit" or something.

Then you want a small area of the map set aside for hero selection. Make it so you cant get from the hero selection area to the main part of the map, and vice versa. The easiest way is to make a circle of power (Units>Neutral Passive>Campaign) and put a hero in the middle of it. Now change the owner of the unit to neutral passive.

Lets call this hero "Bob" for now. Make a region around bob and call it "HeroBob". Now make another region where you want the player hero to appear. Call this "HeroSpawnBob". Now you have to make a trigger for it.

Events:
Unit Enters Region: "HeroBob"

Conditions:
[Unit-Type Comparison]
Unit-Type of [Entering Unit] is equal to "Choosing Unit"

Actions:
Unit - Remove [Entering Unit]
Unit - Create 1 Bob at "HeroSpawnBob" for player "Owner of [Entering Unit]".

If you want, you can add other stuff, but thats the general idea. If you want each hero to be chosen only once, you should add these two extra actions:

Trigger - Turn off [This Trigger]
Unit - Remove "Bob" (The neutral bob thats standing in the circle of power)

I hope that helps. If you have any other questions, just ask :D
 
Hey thanks for the help....i still need how to do a duel...so if anyone can please help me i would appreciate it
 
Click to select is so much easier on the stupid people who play :)

Code:
Red Pick
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering unit) Equal to HeroesMiddle[1]
            Then - Actions
                Unit - Create 1 Archmage for Player 1 (Red) at (Center of Red Base Top <gen>) facing 0.00 degrees
                Hero - Modify unspent skill points of (Triggering unit): Add 1 points
                Camera - Pan camera for Player 1 (Red) to (Center of Red Base Top <gen>) over 1.00 seconds
                Wait 0.60 seconds
                Special Effect - Create a special effect at (Center of Red Base Top <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering unit) Equal to HeroesMiddle[2]
            Then - Actions
                Unit - Create 1 Heavy Assualt for Player 1 (Red) at (Center of Red Base Top <gen>) facing 0.00 degrees
                Hero - Modify unspent skill points of (Triggering unit): Add 1 points
                Camera - Pan camera for Player 1 (Red) to (Center of Red Base Top <gen>) over 1.00 seconds
                Wait 0.60 seconds
                Special Effect - Create a special effect at (Center of Red Base Top <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering unit) Equal to HeroesMiddle[3]
            Then - Actions
                Unit - Create 1 Sniper for Player 1 (Red) at (Center of Red Base Top <gen>) facing 0.00 degrees
                Hero - Modify unspent skill points of (Triggering unit): Add 1 points
                Camera - Pan camera for Player 1 (Red) to (Center of Red Base Top <gen>) over 1.00 seconds
                Wait 0.60 seconds
                Special Effect - Create a special effect at (Center of Red Base Top <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Triggering unit) Equal to HeroesMiddle[4]
            Then - Actions
                Unit - Create 1 Paladin for Player 1 (Red) at (Center of Red Base Top <gen>) facing 0.00 degrees
                Hero - Modify unspent skill points of (Triggering unit): Add 1 points
                Camera - Pan camera for Player 1 (Red) to (Center of Red Base Top <gen>) over 1.00 seconds
                Wait 0.60 seconds
                Special Effect - Create a special effect at (Center of Red Base Top <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing

:)[/code]
 
click-to-select is actually EVIL.
if you want to check out the base stats for a hero, main attribute, attack, hp, etc. you click and BAM you've accidentally picked a hero you may not like. most people are accustomed to the move-onto-beacon method anyways
 
Status
Not open for further replies.
Back
Top