• 🏆 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] Hero Wars Hero Arena

Status
Not open for further replies.
Level 2
Joined
Jul 19, 2007
Messages
11
I'm trying to make a AoS type map that has a hero/duel arena in it. I can't seem to get my camera bounds to set to the region that I made. Also, I can't seem to get my "pick a random player from each team" trigger to work either. Here's the trigger I made:

  • Events
    • Time - Every 360.00 seconds of game time
  • Actions
    • Game - Pause the game
    • Unit Group - Pick every unit in (Units owned by (Random player from (All players matching (((Picked player) slot status) Equal to Is playing))) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Set Duelist1_Location[1] = (String((Integer((X of (Position of (Picked unit)))))))
        • Set Duelist1_Location[2] = (String((Integer((Y of (Position of (Picked unit)))))))
        • Set Duelist_Picked = (Picked unit)
        • Unit - Move (Picked unit) instantly to (Center of Duelist 1 <gen>), facing 0.00 degrees
    • Unit Group - Pick every unit in (Units owned by (Random player from (All enemies of (Owner of Duelist_Picked))) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Set Duelist2_Location[1] = (String((Integer((X of (Position of (Picked unit)))))))
        • Set Duelist2_Location[2] = (String((Integer((Y of (Position of (Picked unit)))))))
        • Unit - Move (Picked unit) instantly to (Center of Duelist 2 <gen>), facing 180.00 degrees
    • Camera - Set the camera bounds for Player 1 (Red) to Duel Arena <gen>
    • Camera - Apply Duel Arena <gen> for Player 1 (Red) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 2 (Blue) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 3 (Teal) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 4 (Purple) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 5 (Yellow) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 6 (Orange) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 7 (Green) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 8 (Pink) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 9 (Gray) over 0.00 seconds
    • Camera - Apply Duel Arena <gen> for Player 10 (Light Blue) over 0.00 seconds
    • Game - Unpause the game
So pretty much what I'm trying to get it to do is After every 360 seconds, pause the game. Then pick a random hero that belongs to a player that is still playing. Next, store their location (before going into the arena) and store the picked hero into a variable (Duelist_Picked) and move them into the arena. After, pick a random player that is an enemy of the hero stored in the variable Duelist_Picked. Then, store the 2nd hero's location in another variable and move them to the arena. Finally, set the camera bounds to the region (Duel Arena), set all players cameras, and unpause the game.

I've attached my map so that you can get a better look at my triggers and stuff and test it out. It's still in the making so there's still a bunch of stuff I need to set and fix. Btw, I know my map is really big. It's because it has a ton of imports. I still gotta fix the map size.
 
Level 2
Joined
Jul 19, 2007
Messages
11
Sorry didn't attach map with the last one. Here it is.
 

Attachments

  • Ressurection of Legends.w3x
    3.1 MB · Views: 109
Level 4
Joined
Jun 1, 2007
Messages
92
The camera part of your trigger should look similar to this.
  • Events
    • Time - Every 360.00 seconds of game time
  • Conditions
  • Actions
    • Game - Pause the game
    • Unit Group - Pick every unit in (Units owned by (Random player from (All players matching (((Picked player) slot status) Equal to Is playing))) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Set Duelist1_Location[1] = (String((Integer((X of (Position of (Picked unit)))))))
        • Set Duelist1_Location[2] = (String((Integer((Y of (Position of (Picked unit)))))))
        • Set Duelist_Picked = (Picked unit)
        • Unit - Move (Picked unit) instantly to (Center of Duelist 1 <gen>), facing 0.00 degrees
    • Unit Group - Pick every unit in (Units owned by (Random player from (All enemies of (Owner of Duelist_Picked))) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
      • Loop - Actions
        • Set Duelist2_Location[1] = (String((Integer((X of (Position of (Picked unit)))))))
        • Set Duelist2_Location[2] = (String((Integer((Y of (Position of (Picked unit)))))))
        • Unit - Move (Picked unit) instantly to (Center of Duelist 2 <gen>), facing 180.00 degrees
    • [B]For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Camera - Pan camera for (Player((Integer A))) to (Center of Duel Arena <gen>) over 0.00 seconds
        • Camera - Set the camera bounds for (Player((Integer A))) to Duel Arena <gen>[/B]
    • Game - Unpause the game
 
Status
Not open for further replies.
Top