• 🏆 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!

arena fights

Status
Not open for further replies.
Level 1
Joined
Feb 12, 2012
Messages
5
I need some help to make some arenas, or 4 to be exactly.
what i need help to do is make timers to the arenas and there is a 1/4 chance to get in each.
the arenas is: team vs team, 1vs1, all vs all, and finally boss who gets better every 30 min or so. arenas happens every 5 minutes.

and the trigger to teleport the hero to the arenas when arena start ((regions is made, just call them arena 1,2,3,4 and arena getback 1,2,3,4.

if someone got any tips for the arenas, please tell me.
credit if help :D
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
You could do something like:

  • Start Arena Timer
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set ArenaRegion[1] = Region 000 <gen>
      • Set ArenaRegion[2] = Region 001 <gen>
      • Set ArenaRegion[3] = Region 002 <gen>
      • Set ArenaRegion[4] = Region 003 <gen>
      • Countdown Timer - Start ArenaTimer as a One-shot timer that will expire in 300.00 seconds
      • Countdown Timer - Create a timer window for ArenaTimer with title Arena:
      • Set ArenaTimerWindow = (Last created timer window)
      • Countdown Timer - Show ArenaTimerWindow
  • Arena Timer Expires
    • Events
      • Time - ArenaTimer expires
    • Conditions
    • Actions
      • Set Random = (Random integer number between 1 and 4)
      • Set TempLoc = (Center of ArenaRegion[Random])
      • Set TempForce = (All players)
      • Player Group - Pick every player in TempForce and do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            • Loop - Actions
              • Set PositionIndex = (PositionIndex + 1)
              • Set Hero[PositionIndex] = (Picked unit)
              • Set HeroPosition[PositionIndex] = (Position of Hero[PositionIndex])
              • Unit - Move Hero[PositionIndex] instantly to TempLoc
      • Custom script: call DestroyForce(udg_TempForce)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • If (Random Equal to 1) then do (Trigger - Run Area 1 actions <gen> (checking conditions)) else do (If (Random Equal to 2) then do (Trigger - Run Area 2 actions <gen> (checking conditions)) else do (If (Random Equal to 3) then do (Trigger - Run Area 3 actions <gen> (checking conditions)) else do (If (Random Equal to 4) then do (Trigger - Run Area 4 actions
      • Countdown Timer - Pause ArenaTimer
      • Countdown Timer - Destroy ArenaTimerWindow
then in the Area 1-4 triggers simply create the actions for the corresponding arena. Whenever the arena is done, start the timer and create the timer window again.
Also don't forget to loop through Hero and HeroPosition in order to move the hero's back to their location before the arena.
Use PositionIndex as the maximum amount to loop through and set it to 0 afterwards.

I hope this helps.
 
Last edited:
Level 1
Joined
Feb 12, 2012
Messages
5
helps alot!
but don't understand the scripts, how they work, and if the script set bj_wantDestroyGroup = true. wont the teams be separated in all the arenas?
another little thing is that i dont get the triggers correctly like you do. and i got 1 region per player to each arena,
to make the teams start at different places in the arena, and one final thing:
Use PositionIndex as the maximum amount to loop through and set it to 0 afterwards. i didnt understand maximum amount...
in kinda new, trying to make an good map to share with the world
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
set bj_wantDestroyGroup basically removes a memory leak.

A leak is when something stays in memory even though it is not being used anymore inside the game. To make sure that this doesn't happen I use bj_wantDestroyGroup in order to destroy the unit group that is created through Pick every unit in ...

I also used call RemoveLocation(udg_myGUIVariable)
In order to remove a location leak (point)
and call DestroyForce(udg_myGUIVariable)
In order to remove a player group leak.

I can alter it for you, but it might be better if you could send me your map so that I can implement the triggers for you.
I can give examples, but it'll be such a hassle to continuously alter these triggers to your likings.
Seeing the situation by myself would be better so that I can create them for you and put them in your map by instance.
Please send it through PM or in this thread, unless you don't want to ofcourse. That's up to you ;)

EDIT: I can probably fix the income problem for you at the same time ;)
Also, you might want to read up on some GUI tutorials:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/
 
Level 1
Joined
Feb 12, 2012
Messages
5
thanks

the map is not near done, so im not really afraid that people steal this map ^^ hope you can fix this problems for me, and i think i may learn something from what you are doing to the map so heres the map :D the 4 arenas should be at the right of the map, and if its not enough space, i make some on the left side.
team vs team is 2 teams starting in each other side in a big arena, 1vs 1 is 1 vs 1 for all players at the same time (if player is playing) all vs all starts random inside the arena, and finally boss, like the team arena, this is going to be 2 teams to first kill the boss, and i'll have to make the boss getting better after each time or something (to not make it too easy later in the game) thinking boss maybe kil'jaeden.

map is attached :D
thanks!
 

Attachments

  • planetz development 04.03.2012 14.25.w3x
    2.2 MB · Views: 30
Level 14
Joined
Apr 20, 2009
Messages
1,543
By scanning through the object editor I saw that you have created at least 83 location leaks inside your triggers. Which can cause lag in your map to appear. A LOT of it ;)
And I'm not even talking about any other leaks right now so imagine the severe consequences ^.^

I'm not going to take them out one by one since it will take me to much time.
Just make sure that you replace the Center of ... parts with a temporary variable set to that location and then use
  • Custom script: call RemoveLocation(udg_your_temporary_variable)
afterwards.

Also, don't use the Wait action it's really inacurate when playing online.
You might want to use timers instead.

For the arena part: How exactly would you like it to be done?
You want to have an arena every 5 minutes right?
And every 5 minutes it needs to pick one of the 4 arena's randomly.
Do you want the arena's to be re-picked?
As in making it possible to do the same arena again?
Or do they need to be eliminated once done?

Also I'm not sure what you would like to do in each arena so I'll leave that up to you.

One last thing: if there is only 1 arena right now than how am I supposed to test if my trigger worked?
I'm not going to create the arena's themselves for you.
As a temporary solution I'll create the regions and test it.
But I'm not going to fully examine and improve this map since it takes way to much of my precious time ;)
And is it me or is there something wrong with the Dirt terrain tile?
Everything seems to be white for me :S Is that correct?

EDIT: wait, how am I supposed to do this? You don't even store the hero's for the players in any variable, nor do you have any hero selection system?
And what is up with this custom hero I get at start. I'm supposed to walk into a portal with it to be shot to death? :S
I really don't get the point here...

  • timer start 1
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
    • Actions
      • Countdown Timer - Start dietimer[1] as a One-shot timer that will expire in (Real(((Hero level of (Triggering unit)) x 2))) seconds
      • Countdown Timer - Create a timer window for dietimer[1] with title respawn:
      • Countdown Timer - Show (Last created timer window)
      • Set dietimerwindow[1] = (Last created timer window)
      • Wait (Real(((Hero level of (Triggering unit)) x 2))) seconds
      • If ((Owner of (Triggering unit)) Equal to (==) Player 1 (Red)) then do (Hero - Instantly revive (Triggering unit) at (Center of hero spawn down <gen>), Show revival graphics) else do (Do nothing)
  • hero destruct 1
    • Events
      • Time - dietimer[1] expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy dietimerwindow[1]
I hope you do understand that these triggers are wrong in so many ways?

First off, timer start 1 will start even when a normal unit of player 1 dies. Basically you're starting this trigger every time a unit of player 1 dies. It doesn't even have to be a hero here...

Okay so taking that into consideration then what if the unit was just a normal unit and not a hero, then how is this supposed to work:

Countdown Timer - Start dietimer[1] as a One-shot timer that will expire in (Real(((Hero level of (Triggering unit)) x 2))) seconds

There is no hero level since the unit who died was a normal unit. The timer will not be set at all here.

Third: using waits are inaccurate and might be different for each player. You should not use waits, and why even use a wait if you already have a timer? :S Isn't that the purpose of creating the timer to begin with?

Wait (Real(((Hero level of (Triggering unit)) x 2))) seconds

Ow and this will also not work if the unit is a normal one. ;)

Fourth: Now this is the part that troubles me most: why use a wait after starting a timer to then check if the unit that died was one of player 1's units so that you can revive it?

If ((Owner of (Triggering unit)) Equal to (==) Player 1 (Red)) then do (Hero - Instantly revive (Triggering unit) at (Center of hero spawn down <gen>), Show revival graphics) else do (Do nothing)

This stuff got me really confused: ((Owner of (Triggering unit)) Equal to (==) Player 1 (Red)) Didn't you already do that in the event?
Unit - A unit owned by Player 1 (Red) Dies

then this: (Hero - Instantly revive (Triggering unit) at (Center of hero spawn down <gen>), Show revival graphics) else do (Do nothing)

It has 1 location leak: Center of hero spawn down.
Why not put the reviving of the unit inside the second trigger? :vw_wtf:
Why use a wait at all? I guess it's because you want to revive the Triggering unit, but you shouldn't be reviving triggering unit here.
You should be reviving the hero of player 1. Which you can referr to if you set a variable for example:
Hero[1] = (Last sold unit) or something like that for whatever hero selection system you have created. In this case with a tavern.


This is just one example of the 180 triggers you've created. I'm not trying to blow you off and yell at you for what you've done wrong here, please don't see it that way. I'm just trying to say that the triggers that are created in this map should be improved big time. Because now I'm not even abled to create the arena's for you since I would need to create a hero selection system first.

I suggest you take a look at the following tutorials so that you will be abled to improve your triggers:

Hero selection systems
(choose which one you want to create and read it thoroughly)
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hero-selection-systems-38699/

A tutorial on leaks
(This is very usefull and a bit advanced, read carefully and try to understand)
http://www.hiveworkshop.com/forums/...quick-tutorial-common-triggering-tips-190802/

A tutorial on creating timers
(take note of what the creator of that tutorial did with the hero revive 1 trigger, that's basically how yours should look like)
http://www.hiveworkshop.com/forums/...ate-sucessfull-timer-window-reuploaded-97651/

Delirium's essentials tutoral
(Read this tutorial thoroughly it is VERY usefull for new GUI triggerers, this will also explain why you should not use waits)
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/essentials-tutorial-141191/#Wait

Complete and Concise GUI Tutorial
(This tutorial might be usefull as a reference to GUI triggerers. I saw that some of the variables that you've created had array's where they did not need to. Small stuff like that, take a look in this tutorial and be reminded on how things work in GUI)
http://www.hiveworkshop.com/forums/...als-279/complete-concise-gui-tutorial-111863/


I guess this will do for now.
I will not create this arena system for you untill you've created yourself a nice hero selection system. It would be better this way. I could of course do it without any hero selection system but it'll just become even more messy then it already is. Try to clean some stuff up in there and improve it.

And sorry for being such a dick about this.
It was not my intention :(
 
Last edited:
Level 1
Joined
Feb 12, 2012
Messages
5
not at all, thanks for the help!

i guess i'll just have to improve everything and learn some more, maybe i learn to do the arenas at the same time :)

appreciate it!
 
Status
Not open for further replies.
Top