Need help with duel trigger

emphh

Active Member
Reaction score
0
Trigger:
  • Untitled Trigger 010
    • Events
      • Time - Duel expires
    • Conditions
    • Actions
      • Set team1[(Team number of Player 1 (Red))] = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • Set team2[(Team number of Player 5 (Yellow))] = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 5 (Yellow)) Equal to True))
      • Set random = (Random unit from team1[0])
      • Unit - Move random instantly to (Center of arena1 <gen>), facing Default building facing degrees
      • Unit Group - Remove random from team1[0]
      • Set random = (Random unit from team2[0])
      • Unit - Move random instantly to (Center of arena2 <gen>), facing Default building facing degrees
      • Unit Group - Remove random from team2[0]




So basically that's my trigger. I didn't expect it to work when I made it and ofc it didn't work. I'm just wondering what have gotten wrong.
What I want the trigger to do is to take 1 random hero from each team and make them duel each other in the arena. The other players that don't get to duel will have their hero spectating the duel and when its over they will be ported back to their original position.

I "know" I did something wrong with the
"Set team1[(Team number of Player 1 (Red))]......" so maybe that could be the only problem hopefully



"Duel" is my timer to countdown to the duels btw.




And this trigger which I think should be working but I could use a second opinion.


Trigger:
  • Untitled Trigger 011
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • (Number of units in (Units in arena <gen>)) Equal to 1
    • Actions
      • Wait 5.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) is in team1[0]) Equal to True
        • Then - Actions
          • Unit - Move (Killing unit) instantly to (Center of spawn 1 <gen>)
        • Else - Actions
          • Unit - Move (Killing unit) instantly to (Center of spawn 2 <gen>)
      • Countdown Timer - Start Duel as a One-shot timer that will expire in 30.00 seconds
 

Joccaren

You can change this now in User CP.
Reaction score
54
Welcome to The Helper!!!!

Please use WC3 tags from no on when posting triggers, they make the triggers easier to read. To use WC3 tags, enter you trigger editer, right click the white page icon at the top of your trigger and select 'copy as text'.
Then, come to your post, left click once the WC3 tags icon (The Yellow a) and paste your trigger-as-text between the tags.
Trigger:
  • This is what WC3 tags look like in the Helper
    • Much Easier to read


For your problem, yes. I believe the Team1(Team number of (Player 1 (Red)))is incorrect. Change that to 0 and it should work.

Your second trigger seems to be fine though.
 

emphh

Active Member
Reaction score
0
do you mean like this?
Trigger:
  • Untitled Trigger 010
    • Events
      • Time - Duel expires
    • Conditions
    • Actions
      • Set team1[0] = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • Set team2[0] = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 5 (Yellow)) Equal to True))
      • Set random = (Random unit from team1[0])
      • Unit - Move random instantly to (Center of arena1 <gen>), facing Default building facing degrees
      • Unit Group - Remove random from team1[0]
      • Set random = (Random unit from team2[0])
      • Unit - Move random instantly to (Center of arena2 <gen>), facing Default building facing degrees
      • Unit Group - Remove random from team2[0]


because that didn't work
 

Joccaren

You can change this now in User CP.
Reaction score
54
Try this Trigger:
Trigger:
  • GetRandomUnit
    • Events
      • Time - Duel expires
    • Conditions
    • Actions
      • Unit - Move (Random unit from (Units in (Playable map area) matching (((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True))) instantly to (Center of (Playable map area))
      • Unit - Move (Random unit from (Units in (Playable map area) matching (((Owner of (Matching unit)) is an ally of Player 5 (Yellow)) Equal to True))) instantly to (Center of (Playable map area))
 

Bloodydood

New Member
Reaction score
14
Click Here to learn about memory leaks.

Gimmie a sec to get the triggers made

[EDIT]
Variables:
Duel_Timer - Timer
Duel_TimerWindow - Timer Window
Temp_Group - Unit Group
Temp_Point - Point
Hero - Unit Array (Size: 2)

Trigger:
  • Test Duel
    • Events
      • Time - Duel_Timer expires
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True))
      • Set Hero[1] = (Random unit from Temp_Group)
      • Countdown Timer - Destroy Duel_TimerWindow
      • Set Temp_Point = (Center of (Playable map area))
      • Unit - Move Hero[1] instantly to Temp_Point
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Set Temp_Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) is an ally of Player 2 (Blue)) Equal to True))
      • Set Hero[2] = (Random unit from Temp_Group)
      • Set Temp_Point = (Center of (Playable map area))
      • Unit - Move Hero[2] instantly to Temp_Point
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Trigger - Turn on Test Duel Result <gen>

Trigger:
  • Test Duel Result (Initially Off)
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Hero[1]
          • (Triggering unit) Equal to Hero[2]
    • Actions
      • Trigger - Turn off (This trigger)
      • Countdown Timer - Create a timer window for Duel_Timer with title Next Duel
      • Set Duel_TimerWindow = (Last created timer window)
      • Countdown Timer - Start Duel_Timer as a One-shot timer that will expire in 300.00 seconds
      • Countdown Timer - Show Duel_TimerWindow


That'd be my basic idea using a timer
 

emphh

Active Member
Reaction score
0
Set Temp_Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True))


i cant seem to find how to make that because when i get to
Set Temp_Group = (Units in (Playable map area) matching (((Owner of (Matching unit))
i dont know how to make them an ally of player red.

heres how i do it step by step.
Set variable
Set temp_group = value
and then i click value and do Units in region matching condition.
Units in (playable map area) matching condition
and then im stuck.

what should the matching condition be? a player comparison? if so how do you go from there to set Ally of of player 1 blablabla?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Then you click "Condition", and then "Boolean Comparison".
Then you look for something like "Player - Player Is An Ally Of Player" or something :D
 

emphh

Active Member
Reaction score
0
alright it looks like this now
Trigger:
  • Untitled Trigger 010
    • Events
      • Time - Duel expires
    • Conditions
    • Actions
      • Set temp_group = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
      • Set hero[1] = (Random unit from temp_group)
      • Countdown Timer - Destroy duel_window
      • Set temp_point = (Center of arena1 <gen>)
      • Unit - Move hero[1] instantly to temp_point
      • Custom script: call RemoveLocation(udg_temp_point)
      • Custom script: call DestroyGroup(udg_temp_group)
      • Set temp_group = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 5 (Yellow)) Equal to True))
      • Set hero[2] = (Random unit from temp_group)
      • Set temp_point = (Center of arena2 <gen>)
      • Unit - Move hero[2] instantly to temp_point
      • Custom script: call RemoveLocation(udg_temp_point)
      • Custom script: call DestroyGroup(udg_temp_group)
      • Trigger - Turn on Untitled Trigger 011 <gen>


It teleports units to the arena but it teleports all kinds of units, it teleports neutral passives and friendly computers, how do i edit it so it only teleports heroes?
 

jackall

You can change this now in User CP.
Reaction score
37
Trigger:
  • Set temp_group = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))
make it an and, and use the
Trigger:
  • Matching unit is a hero Equal to True
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You'll need to modify the unit-groups a bit ;)

Your first one should look like this:
Trigger:
  • Set temp_group = (Units in (Playable map area) matching ((((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))


To make it look like that, you have to use the line called "And" (When you've clicked the red "Condition"), which lets you pick 2 conditions instead of one...

So, in one of them you put the ally check, and in the other one you use "Boolean Comparison", and then use the line "Unit - Unit Classification Check", and then change "Triggering unit" to "Matching unit" and "A structure" to "A Hero" ;)
 

Bloodydood

New Member
Reaction score
14
You'll need to modify the unit-groups a bit ;)

Your first one should look like this:
Trigger:
  • Set temp_group = (Units in (Playable map area) matching ((((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))


To make it look like that, you have to use the line called "And" (When you've clicked the red "Condition"), which lets you pick 2 conditions instead of one...

So, in one of them you put the ally check, and in the other one you use "Boolean Comparison", and then use the line "Unit - Unit Classification Check", and then change "Triggering unit" to "Matching unit" and "A structure" to "A Hero" ;)

Was about to change the trigger for that...

Well I'll do it anyways :D

Trigger:
  • Test Duel
    • Events
      • Time - Duel_Timer expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy Duel_TimerWindow
      • Set temp_group = (Units in (Playable map area) matching ((((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
      • Set Hero[1] = (Random unit from Temp_Group)
      • Set Temp_Point = (Center of (Playable map area))
      • Unit - Move Hero[1] instantly to Temp_Point
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Set temp_group = (Units in (Playable map area) matching ((((Owner of (Matching unit)) is an ally of Player 2 (Blue)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
      • Set Hero[2] = (Random unit from Temp_Group)
      • Set Temp_Point = (Center of (Playable map area))
      • Unit - Move Hero[2] instantly to Temp_Point
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Trigger - Turn on Test Duel Result <gen>

Trigger:
  • Test Duel Result (Initially Off)
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Hero[1]
          • (Triggering unit) Equal to Hero[2]
    • Actions
      • Trigger - Turn off (This trigger)
      • Countdown Timer - Create a timer window for Duel_Timer with title Next Duel
      • Set Duel_TimerWindow = (Last created timer window)
      • Countdown Timer - Start Duel_Timer as a One-shot timer that will expire in 300.00 seconds
      • Countdown Timer - Show Duel_TimerWindow
      • Set Temp_Point = (Center of Team 1 Base <gen>)
      • Unit - Move Hero[1] instantly to Temp_Point
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is dead) Equal to True
          • (Triggering unit) Equal to Hero[1]
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at Temp_Point, Show revival graphics
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Set Temp_Point = (Center of Team 2 Base <gen>)
      • Unit - Move Hero[2] instantly to Temp_Point
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is dead) Equal to True
          • (Triggering unit) Equal to Hero[2]
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at Temp_Point, Show revival graphics
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Temp_Point)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top