• 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.

Fight event

Level 2
Joined
Jan 23, 2025
Messages
12
Hi everyone, I'm new in world Editor and and I don't understand how work ttriggers.

I would like you to help me do this or make an example map (I prefer this):

- When a player reaches level 20 or higher and types the text -FIGHT, he will teleport to a map region for fight vs a creep.

- If the creep defeats you, you can try -FIGHT again until you kill him.

- When the creep dies, he will give you an item, when you pick it up, you will return to other region. When you have the item of the creep, the player can't -FIGHT anymore.

- You can only -FIGHT if you have full hitpoints.

- You cant -FIGHT if other player is doing it.

Thanks to the forum and all the people.
Enviar comentarios
 
Level 12
Joined
Jul 5, 2014
Messages
551
All players have only 1 hero (1-30 max level)
I'm not in front of a computer right now but check the conditions.

Event - chat message -FIGHT

Condition

Hero level is greater or equal to 20 (this is an integer condition)

Region (arena) contains player X equals to false (boolean)

I think hit points require a "real" condition that's set to percentage of hit points 100%

Teleporting a hero needs some kind of ID for each player's hero. Then it's just unit - move instantly to center of region (you better name that region with a variable or it will leak). You should also have a camera action unless the camera is locked on the hero.

I'm not sure how you want to have heroes lose the fight. Do they die? Instantly resurrected? Or teleported out when they have a certain low HP?
 
Level 2
Joined
Jan 23, 2025
Messages
12
I won't be in front of the PC for two weeks. 😫

Yes, players can die figting vs the creep.

If your hero dies he will be resurrected in the same way as if he died by another hero or tower.
 
Level 12
Joined
Jul 5, 2014
Messages
551
I won't be in front of the PC for two weeks. 😫

Yes, players can die figting vs the creep.

If your hero dies he will be resurrected in the same way as if he died by another hero or tower.
Then you simply remove the creep if a hero dies and create new one whenever the fight starts.

You can also do the Rexxar campaign solution and instead of typing, you have a circle of power with a region in it. If a player enters, the arena begins.

But you should save this stuff somewhere if you're not able to try it for 2 weeks.
 
Level 2
Joined
Jan 23, 2025
Messages
12
Exactly, if you die by the creep, the creep will have maximum life again.

I would like that when you can and have time, you tell me exactly how it would be thecteiggers. Thk 🙏🏻👍🏼
 
Level 12
Joined
Jul 5, 2014
Messages
551
Exactly, if you die by the creep, the creep will have maximum life again.

I would like that when you can and have time, you tell me exactly how it would be thecteiggers. Thk 🙏🏻👍🏼
I made you a very simple version, just to get the idea. Multiplayer application needs more tinkering but that's the basic concept.
 

Attachments

  • Arena.w3x
    20.5 KB · Views: 6
Level 2
Joined
Jan 23, 2025
Messages
12
No problem. Hopefully, it's something like you were planning.
Hello!!, I have tested your map and it works perfectly. But I have changed the triggers because it is difficult for me to understand and adapt it to my map. I have done the following but it does not work for me, the Hero does not move to the region and the creep is not created.

Events
Player - Player 3 (Teal) types a chat message containing -FIGHT as An exact match
Conditions
(Hero level of (Triggering unit)) Equal to 30
(Life of (Triggering unit)) Equal to 100.00
Actions
Unit - Move (Triggering unit) instantly to (Center of PLAYER 3 ARENA <gen>), facing (Position of (Triggering unit))
Unit - Create 1 Guerrero ursa fúrbolg for Player 12 (Brown) at (Center of CREEP ARENA <gen>) facing (Position of (Triggering unit))

Please i need your help. I have been able to adapt the other triggers to my map and only this one is missing.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
Hello!!, I have tested your map and it works perfectly. But I have changed the triggers because it is difficult for me to understand and adapt it to my map. I have done the following but it does not work for me, the Hero does not move to the region and the creep is not created.

Events
Player - Player 3 (Teal) types a chat message containing -FIGHT as An exact match
Conditions
(Hero level of (Triggering unit)) Equal to 30
(Life of (Triggering unit)) Equal to 100.00
Actions
Unit - Move (Triggering unit) instantly to (Center of PLAYER 3 ARENA <gen>), facing (Position of (Triggering unit))
Unit - Create 1 Guerrero ursa fúrbolg for Player 12 (Brown) at (Center of CREEP ARENA <gen>) facing (Position of (Triggering unit))

Please i need your help. I have been able to adapt the other triggers to my map and only this one is missing.
You need to learn how Events and Event Responses work. You're referencing (Triggering unit) as if that's supposed to mean something. What is the (Triggering unit)? The Event here is that a PLAYER typed a message, it has nothing to do with UNITS.

Event Responses are only usable after an Event happens:
A unit dies -> Dying unit.
A unit enters a region -> Entering unit.
A unit gains a level - Leveling hero.
A player types a chat message -> Triggering player.

(Triggering unit) always refers to the Unit mentioned in the Event, so it can work as the Dying unit, Entering unit, Leveling hero, etc. It's like a shortcut that should work 99% of the time. (Triggering player) works the same way.


Anyway, I modified WarCortez's map to show how you can extend it even further for things like Multiplayer. I attached the map below.
 

Attachments

  • Arena New 1.w3x
    23.7 KB · Views: 5
Level 2
Joined
Jan 23, 2025
Messages
12
Ok guys, I want to thank you for the help and for your patience with me.Your maps work perfectly.

But I have to adapt those detonators to my map and I'm a bit of a noob in WE.

I have 3 detonators, the only one that fails is this one (Nº1), because the Hero does not transport to the region. Any ideas to solve it?

On my map each player selects 1 Hero from the tavern.

Nº 1 NOT WORKING
Events
Player - Player 3 (Teal) types a chat message containing -FIGHT as An exact match
Conditions
(Hero level of (Triggering unit)) Equal to 30
(Life of (Triggering unit)) Equal to 100.00
Actions
Unit - Move (Revivable Hero) instantly to (Center of PLAYER 3 ARENA <gen>), facing (Position of (Triggering unit))
Unit - Create 1 Guerrero ursa fúrbolg for Player 12 (Brown) at (Center of CREEP ARENA <gen>) facing (Position of (Triggering unit))


The Hero does not transport to the region 😩, help me fix it please!

Nº 2 WORKS
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Furbold Ursa Warrior
Actions
Item - Create Claws of attack at (Center of CREEP ARENA <gen>)


Nº 3 WORKS
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Claws of attack
Actions
Trigger - Turn off (This trigger)
Unit - Move (Triggering unit) instantly to (Center of TEAM 1 BASE <gen>)
Camera - Pan camera for Player 3 (Teal) to (Center of TEAM 1 BASE <gen>) over 0.10 seconds



Thank you very much for your time guys!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
I explained to you why your 1st trigger doesn't work, none of those Event Responses can be used with that Event. There is no (Triggering unit) because the Event has nothing to do with Units. There is no (Revivable hero) because the Event has nothing to do with a Hero reviving.

Event Responses only work with the Event(s) that they belong to.

The map I attached (WarCortez's map as well) shows you how to get your first trigger to work by using Variables to keep track of the Hero.
 
Last edited:
Level 2
Joined
Jan 23, 2025
Messages
12
There must be some error because I copy all triggers and it does not work on my map. Sorry guys.

Could you fix number 1 in an easy way for me?

Revivable hero dont need, i have done this trigger. Thk!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
There must be some error because I copy all triggers and it does not work on my map. Sorry guys.

Could you fix number 1 in an easy way for me?

Revivable hero dont need, i have done this trigger. Thk!
You tried my map? Because it has a Setup trigger that you need to modify to make work, it needs to know where your Regions are and all of that stuff.
 
Level 2
Joined
Jan 23, 2025
Messages
12
Yes, I have copied everything: Triggers and regions. I need that simple trigger for you. 🙏 🙏 🙏 🙏 🙏 😥

There has to be a simpler way to do it. That even I can do it.

I await your solution. Regards.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
Do you want it to work? Because it's going to be buggy if you don't do things properly.

Step 1) Create these Variables:
PN = Integer
Hero = Unit (array)
Arena_Enemy = Unit (array)
Arena_Hero_Point = Point (array)
Arena_Enemy_Point = Point (array)
Arena_Is_On = Boolean (array)

Click the little "Array" box to make the Variable an (array).

Step 2) Setup each Player's arena variables:
  • Arena Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Setup PLAYER 3 --------
      • Set Variable PN = 3
      • Set Variable Arena_Hero_Point[PN] = (Center of PLAYER 3 HERO ARENA <gen>)
      • Set Variable Arena_Enemy_Point[PN] = (Center of PLAYER 3 ENEMY ARENA <gen>)
Step 3) Track each Player's hero when they pick it:
  • Player Picks A Hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
      • Hero[(Player number of (Owner of (Sold unit))] Equal to No unit
    • Actions
      • Set Variable PN = (Player number of (Owner of (Sold unit)))
      • Set Variable Hero[PN] = (Sold unit)
Step 4) Allow each Player to type -FIGHT to enter their own Arena:
  • Arena Fight
    • Events
      • Player - Player 1 (Teal) types a chat message containing -FIGHT as An exact match
      • Player - Player 2 (Teal) types a chat message containing -FIGHT as An exact match
      • Player - Player 3 (Teal) types a chat message containing -FIGHT as An exact match
    • Conditions
      • Arena_Is_On[(Player number of (Triggering player))] Equal to False
      • (Hero level of Hero[(Player number of (Triggering player))] Greater than or equal to 30
      • (Percentage life of Hero[(Player number of (Triggering player))] Greater than or equal to 100.00
    • Actions
      • Set Variable PN = (Player number of (Triggering player))
      • Set Variable Arena_Is_On[PN] = True
      • Unit - Move Hero[PN] instantly to Arena_Hero_Point[PN], facing 90.00 degrees
      • Unit - Create 1 Guerrero ursa fúrbolg for Player 12 (Brown) at Arena_Enemy_Point[PN] facing 270.00 degrees
      • Set Variable Arena_Enemy[PN] = (Last created unit)
Step 5) Determine when the Arena Enemy dies and you Win the fight:
  • Arena Win
    • Events
      • Unit - A unit Dies
    • Conditions
      • Arena_Is_On[(Player number of (Owner of (Killing unit))] Equal to True
      • (Dying unit) Equal to Arena_Enemy[(Player number of (Owner of (Killing unit))]
    • Actions
      • Set Variable PN = (Player number of (Owner of (Killing unit))
      • Set Variable Arena_Is_On[PN] = False
      • Item - Create Claws of attack at Arena_Enemy_Point[PN]
      • -------- Do stuff because you won the fight --------
Step 6) Determine when the Arena Hero dies and you Lose the fight:
  • Arena Lose
    • Events
      • Unit - A unit Dies
    • Conditions
      • Arena_Is_On[(Player number of (Owner of (Dying unit))] Equal to True
      • (Dying unit) Equal to Hero[(Player number of (Owner of (Dying unit))]
    • Actions
      • Set Variable PN = (Player number of (Owner of (Dying unit))
      • Set Variable Arena_Is_On[PN] = False
      • -------- Do stuff because you lost the fight--------
 
Last edited:
Level 2
Joined
Jan 23, 2025
Messages
12
I have done what you say UNCLE and everything works perfectly. 👏👏👏👏👏👏

You've finally done it! Thank you very much UNCLE and WARCORTEZ.

I love you guys!

I added this so that when the creep kills the hero, it disappears:

base.gif
Arena Lose
  • joinminus.gif
    events.gif
    Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Dies
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      join.gif
      if.gif
      Arena_Is_On[(Player number of (Owner of (Dying unit))] Equal to True
    • line.gif
      joinbottom.gif
      if.gif
      (Dying unit) Equal to Hero[(Player number of (Owner of (Dying unit))]
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      Unit - Remove (Killing unit) from the game
    • set.gif
      Set Variable PN = (Player number of (Owner of (Dying unit))
    • empty.gif
      join.gif
      set.gif
      Set Variable Arena_Is_On[PN] = False
It's well done, isn't it?
 
Level 12
Joined
Jul 5, 2014
Messages
551
I have done what you say UNCLE and everything works perfectly. 👏👏👏👏👏👏

You've finally done it! Thank you very much UNCLE and WARCORTEZ.

I love you guys!

I added this so that when the creep kills the hero, it disappears:

base.gif
Arena Lose
  • joinminus.gif
    events.gif
    Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Dies
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      join.gif
      if.gif
      Arena_Is_On[(Player number of (Owner of (Dying unit))] Equal to True
    • line.gif
      joinbottom.gif
      if.gif
      (Dying unit) Equal to Hero[(Player number of (Owner of (Dying unit))]
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      Unit - Remove (Killing unit) from the game
    • set.gif
      Set Variable PN = (Player number of (Owner of (Dying unit))
    • empty.gif
      join.gif
      set.gif
      Set Variable Arena_Is_On[PN] = False
It's well done, isn't it?
Take it slow with triggering if you're new. Uncle's triggers are often advanced even for me. I remember my WE newbie era, and what I could do was practically "unit dies" and "cinematic transmission". By now, I can make Rexxar-like map travels and more tricky triggering. This site helped a great deal with my improvement but it takes time to get to know the functions, so first maps shouldn't be overly ambitious.
 
Top