• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Pvp

Status
Not open for further replies.
Level 6
Joined
Apr 30, 2008
Messages
153
how do i make a pvp trigger
i want it so that once a hero enters a region they are enemy's even if they are allies
and when they enter this region they wait till another person enters the region
and only have 2 ppl in this arya
 
Level 3
Joined
Jul 24, 2007
Messages
40
maybe something like:
  • Events: A unit enters NoRegion
  • Conditions: ((Triggering unit) is a hero) Equal to True
  • Actions:
  • If (All conditions are True) then do (Then Actions) else do (Else Actions)
  • If-Conditions: hero1 = null
  • Then-Actions:
    • set hero1 = TriggerUnit
  • Else -Actions:
    • set hero2 = Trigger unit
    • set 2heroes = True
  • If (All conditions are True) then do (Then Actions) else do (Else Actions)
  • If-Conditions: 2heroes = true
  • Then-Actions:
    • Player-Make (Owner of hero1) treat (Owner of hero2) as an enemy.
  • Else-Actions:
  • Do nothing
This will make the 2 units that enter your region become enemies.

maybe something like:

~~~Update

maybe something like:

  • Events: A unit enters NoRegion
  • Conditions: ((Triggering unit) is a hero) Equal to True
  • Actions:
  • If (All conditions are True) then do (Then Actions) else do (Else Actions):
  • If-Conditions: If 2heroes = True
  • Then - Actions
  • set (Triggering unit) = hero3
  • unit-move hero3 to Elseregion
  • Else Actions:
    • do nothing
this will keep a third hero from entering the fight
 
Level 3
Joined
Jul 24, 2007
Messages
40
oops sorry instead of null use no unit
hero1 //unit
hero2 //unit
hero3 //unit
and
2heroes //boolean
are variables

EDIT:

NoRegion is a region
ElseRegion is another region
 
Level 4
Joined
Sep 9, 2004
Messages
112
Sorry pizza but I was reading yours and it isn't very efficent from the looks of it.. It doesn't reset the Arena if someone wins either..

Try this:

Only one Variable is required:
ArenaHeros (Unit-Array[2])

Only 2 Regions required:
Arena Field (The actual arena zone where the combat will take place. Must cover the entire Arena floor)
Arena Entrance (The spot where you want to send units if there is a duel already in progress)

And these 4 triggers:
1) Sets up the arena by selecting the 2 heros the enter the arena.
  • Arena Setup
    • Events
      • Unit - A unit enters Arena Field <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ArenaHeros[1] Equal to No unit
        • Then - Actions
          • Set ArenaHeros[1] = (Entering unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ArenaHeros[2] Equal to No unit
            • Then - Actions
              • Do nothing
            • Else - Actions
              • Player - Make (Owner of ArenaHeros[1]) treat (Owner of ArenaHeros[2]) as an Enemy
              • Player - Make (Owner of ArenaHeros[2]) treat (Owner of ArenaHeros[1]) as an Enemy
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ArenaHeros[2] Equal to No unit
            • Then - Actions
              • Set ArenaHeros[2] = (Entering unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ArenaHeros[1] Equal to No unit
                • Then - Actions
                  • Do nothing
                • Else - Actions
                  • Player - Make (Owner of ArenaHeros[1]) treat (Owner of ArenaHeros[2]) as an Enemy
                  • Player - Make (Owner of ArenaHeros[2]) treat (Owner of ArenaHeros[1]) as an Enemy
            • Else - Actions
              • Do nothing
2) Prevents any unit other than the 2 set heros from entering the arena.
  • Duel Block
    • Events
      • Unit - A unit enters Arena Field <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Entering unit) is A Hero) Equal to True
              • Or - Any (Conditions) are true
                • Conditions
                  • ArenaHeros[1] Equal to No unit
                  • ArenaHeros[2] Equal to No unit
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Unit - Move (Entering unit) instantly to (Center of Arena Entrance <gen>)
          • Game - Display to (Owner of (Entering unit)), at offset (0.00, 0.00) the text: You are not allowed...
3) Resets one of the Hero slots if one of the dueling heros die.
  • Duel End
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Dying unit) Equal to ArenaHeros[1]
          • (Dying unit) Equal to ArenaHeros[2]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to ArenaHeros[1]
        • Then - Actions
          • Player - Make (Owner of ArenaHeros[1]) treat (Owner of ArenaHeros[2]) as an Ally with shared vision
          • Player - Make (Owner of ArenaHeros[2]) treat (Owner of ArenaHeros[1]) as an Ally with shared vision
          • Set ArenaHeros[1] = No unit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to ArenaHeros[2]
            • Then - Actions
              • Player - Make (Owner of ArenaHeros[1]) treat (Owner of ArenaHeros[2]) as an Ally with shared vision
              • Player - Make (Owner of ArenaHeros[2]) treat (Owner of ArenaHeros[1]) as an Ally with shared vision
              • Set ArenaHeros[2] = No unit
            • Else - Actions
              • Do nothing
4) This final trigger resets one of the slots if the Hero runs out and also tells everyone how much of a pussy he is! :p
  • Duel Runner
    • Events
      • Unit - A unit leaves Arena Field <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Leaving unit) Equal to ArenaHeros[1]
          • (Leaving unit) Equal to ArenaHeros[2]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Leaving unit) Equal to ArenaHeros[1]
        • Then - Actions
          • Game - Display to (All players) the text: ((Name of (Owner of ArenaHeros[1])) + has fled from the Arena field!)
          • Player - Make (Owner of ArenaHeros[1]) treat (Owner of ArenaHeros[2]) as an Ally with shared vision
          • Player - Make (Owner of ArenaHeros[2]) treat (Owner of ArenaHeros[1]) as an Ally with shared vision
          • Set ArenaHeros[1] = No unit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Leaving unit) Equal to ArenaHeros[2]
            • Then - Actions
              • Game - Display to (All players) the text: ((Name of (Owner of ArenaHeros[2])) + has fled from the Arena field!)
              • Player - Make (Owner of ArenaHeros[1]) treat (Owner of ArenaHeros[2]) as an Ally with shared vision
              • Player - Make (Owner of ArenaHeros[2]) treat (Owner of ArenaHeros[1]) as an Ally with shared vision
              • Set ArenaHeros[2] = No unit
            • Else - Actions
              • Do nothing
That should cover ya! Good luck. Also, another thing, the fact that you don't pause the units and also the players can have outside units. The other units for the 2 in the duel will be able to attack eachother as well and as far as I know.. there is no way around that other than not having multiple units per player, or pausing all units.
 
Level 4
Joined
Sep 9, 2004
Messages
112
It doesnt work that way, because he said he doesnt want it to stop all things outside of the arena. So if you say that there enemys, then what if they have built their baces close together?

Well obviously you didn't read my post, I already stated everything you just said. And the simple fact of te matter is there is NO other way to make just the heros hostilled twoard eachother witch is what he asked for..
 
Level 3
Joined
Jul 24, 2007
Messages
40
Well here it is....try it out and see if it works
now i feel really stupid....found out there was a unit exits region GODDAMN...I made it around that
 

Attachments

  • PvP.w3x
    22.7 KB · Views: 68
Level 4
Joined
Sep 9, 2004
Messages
112
If your talking about mine.. I know it works.. I just tested it myself.. The only way you can use my map for a test is if you have 3 different human players! I did it without 3 but I had to change the forces so the other 2 guys would chase me..
 
Status
Not open for further replies.
Top