Creating a Hero Pick Duel system, Help?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Creating a Hero Pick Duel system, Help?

Post by Arabidnun »

I want to add a duel system to my game i am creating, that will choose the person with the highest kills on each side. What i want it to do in these steps.


I want this duel system to be in a loop every 4 minutes or something, at least timed

1) Pause the game ( the creeps runing around to kill eachother)
2) Choose the 2 guys with the highest kills on each side
3) Transport the duelers to the arena and the spectators to a seperate close platform near the arena.
4) after duels done transport everyone back to their spots and then resume game.

Basically the version off of heaven vs hell, i'm not that great off of jass triggers and gui systems so if anyone wants to give me some pointers, thanks ^ ^.
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Creating a Hero Pick Duel system, Help?

Post by Xantan »

Arabidnun wrote:I want to add a duel system to my game i am creating, that will choose the person with the highest kills on each side. What i want it to do in these steps.


I want this duel system to be in a loop every 4 minutes or something, at least timed

1) Pause the game ( the creeps runing around to kill eachother)
2) Choose the 2 guys with the highest kills on each side
3) Transport the duelers to the arena and the spectators to a seperate close platform near the arena.
4) after duels done transport everyone back to their spots and then resume game.

Basically the version off of heaven vs hell, i'm not that great off of jass triggers and gui systems so if anyone wants to give me some pointers, thanks ^ ^.
gui is easier for you, and easier for me from scratch.
Jass is easier for you if you are good at war3map.j type insertions only, other then that they probably will break your map.

In that case, ill explain how to do the following in gui:
1. unit -> unit group -> pick every unit in units(units in region, playable map area)--> and do: Unit -> pause unit(picked unit)
2. requires ingame variable calculation + a bit of work, I'll explain it if you want it, and still in gui, just respond and wait.
3. unit, move unit(random unit of type hero owned by player) instantly to region (make a region and then make that the region of course).
4. see above
5. ask
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Creating a Hero Pick Duel system, Help?

Post by Arabidnun »

Thanks Xantan, hey btw any chance u can help me with my duel timer countdown timer, i can get it to display
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Creating a Hero Pick Duel system, Help?

Post by Bartimaeus »

Arabidnun wrote:Thanks Xantan, hey btw any chance u can help me with my duel timer countdown timer, i can get it to display
Create a timer window for your timer.

What kind of arena is this? Angel Arena style, meaing like, 6v6?
If so do something like this -
Spoiler:
Events
Time - Duel expires (This is the duel timer)
Actions
Unit - Pause all units
Game - Display to (All players) the text: (Whatever you want, as you notify players a duel is about to start)
Set Pasued = True (Create a boolean variable and it's initial value is false)
Set Duel = True (Create a boolean variable and it's initial value is false)
Countdown Timer - Start Timer as a One-shot timer that will expire in 100.00 seconds (so the duel won't last forever, timer = another timer variable)
Wait 2.00 seconds
Player Group - Pick every player in (All players) and do (Camera - Pan camera for (Picked player) to center of (region you created for dueling)) over 1.00 seconds)
For each (Integer A) from 1 to 12, do (Set HeroSavePoints[(Integer A)] = (Position of Heroes[(Integer A)])) (Create an variable point array, with size 1)
For each (Integer A) from 1 to 12, do (Set HeroSaveDirection[(Integer A)] = (Facing of Heroes[(Integer A)])) (Create an real array, with size 1)
For each (Integer A) from 1 to 12, do (Unit - Move Heroes[(Integer A)] instantly to (Center of HeroDuelSpots[(Integer A)])) (Create a region variable and check mark array, and keep the red none there)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] face (Center of (region you created for dueling)) over 0.10 seconds)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] Invulnerable)
Set TempMaxKill = 0 (create an integer and it's initial value is 0, and it's not an array)
For each (Integer A) from 1 to 6, do (If ((Kills[(Integer A)] Greater than TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set TempMaxKill = Kills[(Integer A)]) else do (Do nothing))(Create an integer and make it an array and make it size 1)
For each (Integer A) from 1 to 6, do (If ((Kills[(Integer A)] Equal to TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set Team1Leader = (Integer A)) else do (Do nothing))(Create an unit variable)
Set Team1LeaderHero = Heroes[Team1Leader](Create an integer with initial value of 14)
Unit - Move Team1LeaderHero instantly to (Center of (Region on one side of the arena region))
Unit - Set life of Team1LeaderHero to 100.00% (as to balance it out)
Unit - Set mana of Team1LeaderHero to 100.00% (as to balance it out)
Unit - Make Team1LeaderHero Vulnerable
Set TempMaxKill = 0
For each (Integer A) from 7 to 12, do (If ((Kills[(Integer A)] Greater than TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set TempMaxKill = Kills[(Integer A)]) else do (Do nothing)) (This is the same as before, just with team 2)
For each (Integer A) from 7 to 12, do (If ((Kills[(Integer A)] Equal to TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set Team2Leader = (Integer A)) else do (Do nothing)) (This is the same as before, just with team 2)
Set Team2LeaderHero = Heroes[Team2Leader]
Unit - Move Team2LeaderHero instantly to (Center of (the other side of the arena region))
Unit - Set life of Team2LeaderHero to 100.00% (as to balance it out)
Unit - Set mana of Team2LeaderHero to 100.00% (as to balance it out)
Unit - Make Team2LeaderHero Vulnerable
Game - Display to (All players) the text: ((Name of (Player(Team1Leader))) + ( Vs + (Name of (Player(Team2Leader)))))
Wait 5.00 seconds
Game - Display to (All players) the text: 3!
Wait 1.00 seconds
Game - Display to (All players) the text: 2!
Wait 1.00 seconds
Game - Display to (All players) the text: 1!
Wait 1.00 seconds
Game - Display to (All players) the text: (Whatever you want, maybe Fight!, or something)
Unit - Unpause Team1LeaderHero
Unit - Unpause Team2LeaderHero

Right, now onto the heroes part.
Now, when selecting a hero, do -
Actions
Set Heroes[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
after the hero spawned, so right after the hero selector goes into the region, create the unit, and put this right after that. This will not work if you somehow get more than two heroes. This will also work if you have it selected at a tavern or something. You might want to set up a leaderboard. Onto ending the duel.

Events
Unit - A unit owned by Player 1 (Red) Dies
Unit - A unit owned by Player 2 (Blue) Dies
Unit - A unit owned by Player 3 (Teal) Dies
Unit - A unit owned by Player 4 (Purple) Dies
Unit - A unit owned by Player 5 (Yellow) Dies
Unit - A unit owned by Player 6 (Orange) Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Dying unit) has an item of type Ankh of Reincarnation) Equal to False
Actions
If (Duel Equal to True) then do (Set Team2Kills = (Team2Kills + 3)) else do (Set Team2Kills = (Team2Kills + 1)) (Create an integer 0, default) (This trigger is not required, but instead of giving 1 kill, it gives three)
If ((Owner of (Killing unit)) Not equal to Neutral Hostile) then do (Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)) else do (Do nothing)
If (((Owner of (Killing unit)) Not equal to Neutral Hostile) and (Duel Equal to True)) then do (Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + Wins the Duel! )) else do (Do nothing)
If (Duel Equal to True) then do (Trigger - Run End Duel <gen> (ignoring conditions)) else do (Do nothing) (I'll show you in a minute, it's another trigger)
If (Duel Equal to True) then do (Set Duel = False) else do (Do nothing)
Wait 4.00 seconds
If ((Triggering unit) Equal to Team1LeaderHero) then do (Unit - Move (Triggering unit) instantly to (region on one side of the arena)) else do (Unit - Move (Triggering unit) instantly to (Center of (team one's respawning area)))
Wait 2.00 seconds
If (Duel Equal to False) then do (Camera - Pan camera for (Owner of (Triggering unit)) to (Center of (team one's respawning area))) over 1.00 seconds) else do (Do nothing)
Wait 2.00 seconds
Hero - Instantly revive (Dying unit) at (Center of (team one's respawning area))), Show revival graphics

That was team one's dying trigger. Now onto team 2 -

Events
Unit - A unit owned by Player 7 (Green) Dies
Unit - A unit owned by Player 8 (Pink) Dies
Unit - A unit owned by Player 9 (Gray) Dies
Unit - A unit owned by Player 10 (Light Blue) Dies
Unit - A unit owned by Player 11 (Dark Green) Dies
Unit - A unit owned by Player 12 (Brown) Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Dying unit) has an item of type Ankh of Reincarnation) Equal to False
Actions
If (Duel Equal to True) then do (Set Team1Kills = (Team1Kills + 3)) else do (Set Team1Kills = (Team1Kills + 1)) (Create an integer, 0 default) (This trigger is not required, but instead of giving one kill, it gives three)
If ((Owner of (Killing unit)) Not equal to Neutral Hostile) then do (Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)) else do (Do nothing)
If (((Owner of (Killing unit)) Not equal to Neutral Hostile) and (Duel Equal to True)) then do (Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + Wins the Duel! )) else do (Do nothing)
If (Duel Equal to True) then do (Trigger - Run End Duel <gen> (ignoring conditions)) else do (Do nothing) (I'll show you in a minute, it's another trigger)
If (Duel Equal to True) then do (Set Duel = False) else do (Do nothing)
Wait 4.00 seconds
If ((Triggering unit) Equal to Team2LeaderHero) then do (Unit - Move (Triggering unit) instantly to (Center of Team Two Dueler <gen>)) else do (Unit - Move (Triggering unit) instantly to (Center of (Team two's respawning area)))
Wait 2.00 seconds
If (Duel Equal to False) then do (Camera - Pan camera for (Owner of (Triggering unit)) to (Center of (Team two's respawning area))) over 1.00 seconds) else do (Do nothing)
Wait 2.00 seconds
Hero - Instantly revive (Dying unit) at (Center of (Team two's respawning area))), Show revival graphics

Right, now onto the next part.

Actions
Unit - Pause all units
For each (Integer A) from 1 to 12, do (Unit - Move Heroes[(Integer A)] instantly to HeroSavePoints[(Integer A)], facing HeroSaveDirection[(Integer A)] degrees)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] Vulnerable)
For each (Integer A) from 1 to 12, do (Camera - Pan camera for (Player((Integer A))) to HeroSavePoints[(Integer A)] over 1.00 seconds)
Set Team1Leader = 14
Set Team2Leader = 14
Set Team1LeaderHero = No unit
Set Team2LeaderHero = No unit
Wait 5.00 seconds
Set Duel = False
Set Pasued = False
Unit - Unpause all units
Wait 1.00 seconds
Countdown Timer - Start Duel as a One-shot timer that will expire in 240.00 seconds
And yeah, that should be about it. If you need any help, you're welcome to ask.
Hey Xantan, it's your lucky day, you can check this. :P
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Creating a Hero Pick Duel system, Help?

Post by Arabidnun »

Thanks 4 The help Xantan, its a DOTA type map with a duel system lol.
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Creating a Hero Pick Duel system, Help?

Post by Bartimaeus »

Arabidnun wrote:Thanks 4 The help Xantan, its a DOTA type map with a duel system lol.
Oh, than I haven't a clue.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Creating a Hero Pick Duel system, Help?

Post by Arabidnun »

For each (Integer A) from 1 to 12, do (Set HeroSavePoints[(Integer A)] = (Position of Heroes[(Integer A)])) (Create an variable point array, with size 1)
For each (Integer A) from 1 to 12, do (Set HeroSaveDirection[(Integer A)] = (Facing of Heroes[(Integer A)])) (Create an real array, with size 1)
For each (Integer A) from 1 to 12, do (Unit - Move Heroes[(Integer A)] instantly to (Center of HeroDuelSpots[(Integer A)])) (Create a region variable and check mark array, and keep the red none there)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] face (Center of (region you created for dueling)) over 0.10 seconds)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] Invulnerable)
Set TempMaxKill = 0 (create an integer and it's initial value is 0, and it's not an array)
For each (Integer A) from 1 to 6, do (If ((Kills[(Integer A)] Greater than TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set TempMaxKill = Kills[(Integer A)]) else do (Do nothing))(Create an integer and make it an array and make it size 1)
For each (Integer A) from 1 to 6, do (If ((Kills[(Integer A)] Equal to TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set Team1Leader = (Integer A)) else do (Do nothing))(Create an unit variable)
Set Team1LeaderHero = Heroes[Team1Leader](Create an integer with initial value of 14)


Hey mate i cant get the end of the integers...like the (unit-make heros interger A invulerable, i cant find those, also the (Unit - Make Heroes[(Integer A)] face (Center of (region you created for dueling)) over 0.10 seconds),and Set HeroSaveDirection[(Integer A)] = (Facing of Heroes[(Integer A)])) (Create an real array, with size 1)


any other advice you can get me to find it?Selvanus i'm sorry i mixed up your name and Xantan, i appreciate your help really


Any chance you can AIM me at Scatterdangel and help me out?
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Creating a Hero Pick Duel system, Help?

Post by Bartimaeus »

Arabidnun wrote:For each (Integer A) from 1 to 12, do (Set HeroSavePoints[(Integer A)] = (Position of Heroes[(Integer A)])) (Create an variable point array, with size 1)
For each (Integer A) from 1 to 12, do (Set HeroSaveDirection[(Integer A)] = (Facing of Heroes[(Integer A)])) (Create an real array, with size 1)
For each (Integer A) from 1 to 12, do (Unit - Move Heroes[(Integer A)] instantly to (Center of HeroDuelSpots[(Integer A)])) (Create a region variable and check mark array, and keep the red none there)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] face (Center of (region you created for dueling)) over 0.10 seconds)
For each (Integer A) from 1 to 12, do (Unit - Make Heroes[(Integer A)] Invulnerable)
Set TempMaxKill = 0 (create an integer and it's initial value is 0, and it's not an array)
For each (Integer A) from 1 to 6, do (If ((Kills[(Integer A)] Greater than TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set TempMaxKill = Kills[(Integer A)]) else do (Do nothing))(Create an integer and make it an array and make it size 1)
For each (Integer A) from 1 to 6, do (If ((Kills[(Integer A)] Equal to TempMaxKill) and (((Player((Integer A))) slot status) Equal to Is playing)) then do (Set Team1Leader = (Integer A)) else do (Do nothing))(Create an unit variable)
Set Team1LeaderHero = Heroes[Team1Leader](Create an integer with initial value of 14)


Hey mate i cant get the end of the integers...like the (unit-make heros interger A invulerable, i cant find those, also the (Unit - Make Heroes[(Integer A)] face (Center of (region you created for dueling)) over 0.10 seconds),and Set HeroSaveDirection[(Integer A)] = (Facing of Heroes[(Integer A)])) (Create an real array, with size 1)


any other advice you can get me to find it?Selvanus i'm sorry i mixed up your name and Xantan, i appreciate your help really


Any chance you can AIM me at Scatterdangel and help me out?

You lie! I'm never appreciated! Anyways...What can't you what? And I don't have aim and everytime I download it I get adware and spyware and malware.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Creating a Hero Pick Duel system, Help?

Post by Arabidnun »

(Set HeroSavePoints[(Integer A)] = (Position of Heroes[(Integer A)])) (Create an variable point array, with size 1)

I can get to the set variable(herosavepoints(interger a)) = then this is where i get stuck

i cant find the thing for position of heros

same with the facing hero

Then....

(Unit - Move Heroes[(Integer A)] instantly to (Center of HeroDuelSpots[(Integer A)])) (Create a region variable and check mark array, and keep the red none there)


unit- move heros i cant find that in units for action...idk i just dont see it any chance you can help or even make it and add on an attachment?
Durchdringen
Honorary wc3edit.net Traitor
Posts: 468
Joined: December 10th, 2007, 10:50 pm
Title: The Professional
Location: USA

Re: Creating a Hero Pick Duel system, Help?

Post by Durchdringen »

Selvanus wrote:
Arabidnun wrote: I don't have aim and everytime I download it I get adware and spyware and malware.
Get Trillian. It's a bundle of messengers put together in 1 slick interface.

"Trillian™ is a fully featured, stand-alone, skinnable chat client that supports AIM, ICQ, MSN, Yahoo Messenger, and IRC. It provides capabilities not possible with original network clients, while supporting standard features such as audio chat, file transfers, group chats, chat rooms, buddy icons, multiple simultaneous connections to the same network, server-side contact importing, typing notification, direct connection (AIM), proxy support, encrypted messaging (AIM/ICQ), SMS support, and privacy settings.

Trillian provides unique functionality such as contact message history, a powerful skinning language, tabbed messaging, global status changes (set all networks away at once), Instant Lookup (automatic Wikipedia integration), contact alerts, an advanced automation system to trigger events based on anything happening in the client, docking, hundreds of emoticons, emotisounds, shell extensions for file transfers, and systray notifications."

Here's the link to download it. http://www.download.com/Trillian/3000-2 ... tag=button

I've had no trouble out of it and like it much better than AIM to be honest. It's better to control 1 messenger than have to manage 2 or more at the same time. Hope that helps you.
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!
Spoiler:
(broken image) Thanks for the support!