• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

I need help with hero selection and duel triggers

Status
Not open for further replies.
Level 2
Joined
Sep 13, 2006
Messages
6
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.
 
Level 6
Joined
Aug 22, 2006
Messages
253
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
 
Level 2
Joined
Sep 13, 2006
Messages
6
Hey thanks for the help....i still need how to do a duel...so if anyone can please help me i would appreciate it
 
Level 5
Joined
Sep 10, 2006
Messages
185
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]
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
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.
Top