• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help in my map triggers

Status
Not open for further replies.
Level 2
Joined
Nov 16, 2005
Messages
12
i need help with 2 problems
my map is an hero arena.

the first one is a triger that prevent allies attack allies.

the second is to detect living units in team 1 to make duel end.

look my :idea:idea but dont work i nedd help to fix it or try another way to do it.

the end of duel
Events
Time - Every 5.00 seconds of game time
Conditions
bDuel Equal to True
Actions
For each (Integer A) from 1 to 5, do (If ((Number of living (Unit-type of Heroes[(Integer A)]) units owned by (Owner of Heroes[(Integer A)])) Equal to 0) then do (Trigger - Run End Duel team2 <gen> (checking conditions)) else do (Do nothing))
For each (Integer A) from 6 to 10, do (If ((Number of living (Unit-type of Heroes[(Integer A)]) units owned by (Owner of Heroes[(Integer A)])) Equal to 0) then do (Trigger - Run End Duel team 1 <gen> (checking conditions)) else do (Do nothing))
 
1) Just make a dummy with a polymorph based ability that costs 0 mana that can target enemies and allies.
also give the dummy -1 hp regen and 1(2) hp.

Events:
Unit is attacked
Conditions:
--------
Actions:
If: owner of attacking unit is an allie of owner of attacked unit
Then: Create 1 polymorph dummy at position of attacking unit
Order last created unit to human sorceress - polymorph attacking unit
Else: Do Nothing

PS: Make sure u base the spell off the sorc polymorph and not the neutral hostile, else it doesnt work

2)
For each (Integer A) from 1 to 5, do (If ((Number of living (Unit-type of Heroes[(Integer A)]) units owned by (Owner of Heroes[(Integer A)])) Equal to 0) then do (Trigger - Run End Duel team2 <gen> (checking conditions)) else do (Do nothing))
For each (Integer A) from 6 to 10, do (If ((Number of living (Unit-type of Heroes[(Integer A)]) units owned by (Owner of Heroes[(Integer A)])) Equal to 0) then do (Trigger - Run End Duel team 1 <gen> (checking conditions)) else do (Do nothing))

.... No ..... :P U dont need 2 do it that complicated
Events:
Unit dies
Contitions:
--------
Actions:
If: and conditions:
Dying unit = owned by player 1
integer comparison - number of units owned by player 1 in Rect (a rect that covers the arena) = o
Then: *end the duel*
Else: Do Nothing

Tell me if it doesnt work
 
hey man you can explain it with more details ??
i tried this but dont worked :cry:


the end of duel
Events
Unit - A unit Dies
Conditions
bDuel Equal to True
((Triggering unit) is A Hero) Equal to True
Actions
If ((Owner of (Dying unit)) Equal to (Random player from Team1)) then do (Unit Group - Add (Dying unit) to Team1deadheroes) else do (Do nothing)
If ((Owner of (Dying unit)) Equal to (Random player from Team2)) then do (Unit Group - Add (Dying unit) to Team2deadheroes) else do (Do nothing)
If ((Number of units in Team1deadheroes) Equal to (Number of units in Team1Heroes)) then do (Trigger - run End Duel team2 <gen>) else do (Do nothing)
If ((Number of units in Team2deadheroes) Equal to (Number of units in Team2Heroes)) then do (Trigger - run End Duel team 1 <gen>) else do (Do nothing)
 
Why the hell dont u just do what I said?

Why do u add players to a playergroup in that trigger when they die??? U should add players to the player group in another trigger in map initilization.

Whats this for bullcr*p => If ((Number of units in Team1deadheroes) Equal to (Number of units in Team1Heroes))

The number in 'team1deadheroes' is ALWAYS equal to the number of 'team1deadheroes' :shock:

I dont get what u r trying. Just do precisely as what I told u 2 or 3 post back
 
hey why are you streesing man just relax :P

i finded 2 ways to do it xD one based on your way one that i tryed.

all this could be faster and better if people can give opensource maps.

then tank you


"sorry for my bad english"
 
arthurprs said:
hey why are you streesing man just relax :P

i finded 2 ways to do it xD one based on your way one that i tryed.

all this could be faster and better if people can give opensource maps.

then tank you

It also could be faster if u do what I said!... kidding :P But doesnt it work or not?

arthurprs said:
"sorry for my bad english"

Nobody is perfect...

*cough*exceptme*cough*
 
Status
Not open for further replies.
Back
Top