Spawn Hero Using Region Combos

ballzdeep85

New Member
Reaction score
0
Spawn Hero Using Regions, Help

Ok here is what i would like to happen.

#1.
-I need 3 of the same unit to enter a regionand spawn a hero.
-there are 4 regions 1, 2, 3, 4.
-The 3 units can all go in the same region OR
-2 in one region and 1 into another OR
-all 3 in seperate regions.

-Essentially all is said and done i'll have enough combinations of regions to create 20 Heros.
#2.
-I need it so that each player can only spawn 1 hero.
-Also when a player's hero that is spawned dies it can't be ressurected/ revived.
-Different players can have same hero.
-oh yeah also i would like when the units go into the region(s), when they spawn the hero that they are destroyed.
#3.
-If the players hero does die they can set a combination up with the regions again to get the same hero at lvl 1 or a different one.


If you need to explain things step by step i can wait for each step to be explained. if you want i can test result before we go onto the next step.

please let me know what you guys think.

anymore info you need let me know.


thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
Hero is what i have.
-this is a setup for 3 units that spawn after i get 30 kills (1 unit per 10 kills).
-the 2 of the 2 units go to region 2 and 1 unit into region 1 triggers a spawn of the hero i set up to spawn.
-this combinations should spawn a hero but is not.
-i also would like the 3 units that have gone into regions to die/destroy/disapear from the game after creating the hero.

please show me where i need to change things for this to work.

Trigger:
  • Kill entering Units
    • Events
      • Unit - A unit enters Hero 1 <gen>
      • Unit - A unit enters Hero 2 <gen>
      • Unit - A unit enters Hero 3 <gen>
      • Unit - A unit enters Hero 4 <gen>
    • Conditions
      • (Number of units in (Units in Hero 1 <gen>)) Equal to 1
      • (Number of units in (Units in Hero 2 <gen>)) Equal to 2
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Equal to (Owner of (Entering unit))
        • Then - Actions
          • Unit - Create 1 Saint for (Owner of (Entering unit)) at (Center of Red Base <gen>) facing Default building facing degrees
          • Unit - Kill (Entering unit)
        • Else - Actions

-UPDATE
-this will make 1 hero every time 2 units are in region 2.
-it dosnt care if there is a unit in region 1.
Trigger:
  • Kill entering Units
    • Events
      • Unit - A unit enters Hero 1 <gen>
      • Unit - A unit enters Hero 2 <gen>
      • Unit - A unit enters Hero 3 <gen>
      • Unit - A unit enters Hero 4 <gen>
    • Conditions
      • (Number of units in (Units in Hero 1 <gen>)) Equal to 1
      • (Number of units in (Units in Hero 2 <gen>)) Equal to 2
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Equal to (Owner of (Entering unit))
        • Then - Actions
          • Unit - Create 1 Saint for (Owner of (Entering unit)) at (Center of Red Base <gen>) facing Default building facing degrees
          • Unit - Kill (Entering unit)
        • Else - Actions

UPDATE-
HELP!
thankyou,
ballzdeep85.
 

Smilis

TH.net Regular
Reaction score
7
Hero is what i have.
-this is a setup for 3 units that spawn after i get 30 kills (1 unit per 10 kills).
-the 2 of the 2 units go to region 2 and 1 unit into region 1 triggers a spawn of the hero i set up to spawn.
-this combinations should spawn a hero but is not.
-i also would like the 3 units that have gone into regions to die/destroy/disapear from the game after creating the hero.

please show me where i need to change things for this to work.

Trigger:
  • Kill entering Units
    • Events
      • Unit - A unit enters Hero 1 <gen>
      • Unit - A unit enters Hero 2 <gen>
      • Unit - A unit enters Hero 3 <gen>
      • Unit - A unit enters Hero 4 <gen>
    • Conditions
      • (Number of units in (Units in Hero 1 <gen>)) Equal to 1
      • (Number of units in (Units in Hero 2 <gen>)) Equal to 2
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Equal to (Owner of (Entering unit))
        • Then - Actions
          • Unit - Create 1 Saint for (Owner of (Entering unit)) at (Center of Red Base <gen>) facing Default building facing degrees
          • Unit - Kill (Entering unit)
        • Else - Actions

-UPDATE
-this will make 1 hero every time 2 units are in region 2.
-it dosnt care if there is a unit in region 1.
Trigger:
  • Kill entering Units
    • Events
      • Unit - A unit enters Hero 1 <gen>
      • Unit - A unit enters Hero 2 <gen>
      • Unit - A unit enters Hero 3 <gen>
      • Unit - A unit enters Hero 4 <gen>
    • Conditions
      • (Number of units in (Units in Hero 1 <gen>)) Equal to 1
      • (Number of units in (Units in Hero 2 <gen>)) Equal to 2
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Entering unit)) Equal to (Owner of (Entering unit))
        • Then - Actions
          • Unit - Create 1 Saint for (Owner of (Entering unit)) at (Center of Red Base <gen>) facing Default building facing degrees
          • Unit - Kill (Entering unit)
        • Else - Actions

UPDATE-
HELP!
thankyou,
ballzdeep85.



Put the code
Trigger:
  • Or - Any (Conditions) are true
    • Conditions


in your condition :)
 

ballzdeep85

New Member
Reaction score
0
Put the code
Trigger:
  • Or - Any (Conditions) are true
    • Conditions


in your condition :)

dose not work.
it spawns a hero every time 1 unit goes into region 1 and spawns a hero evertime a unit goes into region 2.

i need it so that when 1 unit goes into region one and 2 units into region 2 then and only then will a hero be spawn.

thankyou,
ballzdeep85
 

Tyman2007

Ya Rly >.
Reaction score
74
Trigger:
  • (Owner of (Entering unit)) Equal to (Owner of (Entering unit))


Quick question. When will the owner of the entering unit be anyone other than the owner of the entering unit? :p

Everytime a unit enters a region, add 1 to a variable. Everytime a unit leaves a region, take away 1 from the same variable.

Unit Enters Region 1
set integer = integer + 1

unit enters region 2
set integer2 = integer2 + 1

both should have actions similar to

if integer is equal to 1 and integer2 is equal to 2, then create the hero

then do something like

unit leaves region 1
set integer = integer - 1

unit leaves region 2
set integer2 = integer2 - 1

see where I'm going with this?
 

ballzdeep85

New Member
Reaction score
0
are you or anyone else able to post this as copied txt for triggers.

i dont really~~~~ understand.

i kinda do but i need to c it for sure to test.

thankyou so much for the help so far.

-UPDATE
ill try it.
sorry didnt read whole post.
UPDATE-

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
what should the array size be on the integers?

i dont know how to set it up like this.

Unit Enters Region 1
set integer = integer + 1

is this ok?
or how should i change it?

Trigger:
  • Region 1
    • Events
      • Unit - A unit enters Hero 1 <gen>
    • Conditions
    • Actions
      • Set Region_1[(Player number of (Triggering player))] = (Region_1[(Player number of (Triggering player))] + 1)

Trigger:
  • Region 2
    • Events
      • Unit - A unit enters Hero 2 <gen>
    • Conditions
    • Actions
      • Set Region_2[(Player number of (Triggering player))] = (Region_2[(Player number of (Triggering player))] + 1)

Trigger:
  • Create saint1
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region_1[(Player number of (Triggering player))] Equal to 1) and (Region_2[(Player number of (Triggering player))] Equal to 2)
        • Then - Actions
          • Unit - Create 1 Saint for (Owner of (Entering unit)) at (Center of Red Base <gen>) facing Default building facing degrees
        • Else - Actions


thankyou,
ballzdeep85.
 

Setharoth114

New Member
Reaction score
5
Okay, what I'm thinking you're trying to do is make it so that, depending on which regions you stand on and how many units you have standing on them determines what hero you get.

If thats the case, then what you have in the post above will work just fine. In the end you will have this:
two triggers for each of the four regions, making eight in total. One of these triggers will deal with entering the region, in which case it'll add one to the variable. The other trigger will subtract one from your variable when it detects a unit leaving the region.

Next, you'll have one trigger that, when it is set to run, determines how the variables line up with the possible heroes and then spawns them accordingly. This trigger is also on your post.

As for spawning only one hero, you could either kill the units you used to enter the regions when they enter them, or you could add a condition to your triggers that says "(Number of units owned by Owner of Entering unit (matching matching unit is a hero equal to true)) less then one." This system is better then killing the entering units because then you can get a new hero when your old one dies, which is also what you wanted.

Finally, if you don't add in any triggers that revive the heroes or any buildings that can revive the heroes, they won't revive, and I suppose you could remove them from the game when they die to get rid of that pesky icon in the corner of the screen.

Also, your players will be able to select the same hero unless you add in something that says they can't, so you're good in that area as well.

Hope that helped.
 

ballzdeep85

New Member
Reaction score
0
kind helped but then again not at all.

i need to see what this stuff looks like please can someone post tags for me.

question:
1.what do the integer have to do with spawning the hero?
2.can i have the entering AND leaving actions be in the same trigger?

like this?
Trigger:
  • Region 2
    • Events
      • Unit - A unit enters Hero 2 <gen>
    • Conditions
    • Actions
      • Set Region_2[(Player number of (Triggering player))] = (Region_2[(Player number of (Triggering player))] + 1)
      • Set Region_2[(Player number of (Triggering player))] = (Region_2[(Player number of (Triggering player))] - 1)


sorry for the dumbness.
i am a very hands on person.
not much for the words.

thankyou,
ballzdeep85.
(picctures always help)
 

Setharoth114

New Member
Reaction score
5
Okay, I'll make the triggers for you and post them, but I won't be able to until tomorrow morning. And no, you can't do entering and leaving a region as the same trigger.
 

ballzdeep85

New Member
Reaction score
0
cool that helps
LIKE THIS?
Trigger:
  • Region 1 entering
    • Events
      • Unit - A unit enters Hero 1 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero 1 <gen> contains (Triggering unit)) Equal to True
        • Then - Actions
          • Set Region_1[0] = (Region_1[0] + 1)
        • Else - Actions

IS THIS RIGHT FOR LEAVING THE REGION?
AND
DO I NEED THE EVENTS, if so is it right?
if not what should it be changed to?
Trigger:
  • Region 1 leaving
    • Events
      • Unit - A unit enters Hero 1 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero 1 <gen> contains (Triggering unit)) Equal to False
        • Then - Actions
          • Set Region_1[0] = (Region_1[0] - 1)
        • Else - Actions

thankyou,
ballzdeep85
 

Setharoth114

New Member
Reaction score
5
Trigger:
  • Enter Region A
    • Events
      • Unit - A unit enters Region A <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] + 1)
      • Set A_Int[(Player number of (Owner of (Triggering unit)))] = (A_Int[(Player number of (Owner of (Triggering unit)))] + 1)


Trigger:
  • Leave Region A
    • Events
      • Unit - A unit leaves Region A <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] - 1)
      • Set A_Int[(Player number of (Owner of (Triggering unit)))] = (A_Int[(Player number of (Owner of (Triggering unit)))] - 1)


Trigger:
  • Enter Region B
    • Events
      • Unit - A unit enters Region B <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] + 1)
      • Set B_Int[(Player number of (Owner of (Triggering unit)))] = (B_Int[(Player number of (Owner of (Triggering unit)))] + 1)


Trigger:
  • Leave Region B
    • Events
      • Unit - A unit leaves Region B <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] - 1)
      • Set B_Int[(Player number of (Owner of (Triggering unit)))] = (B_Int[(Player number of (Owner of (Triggering unit)))] - 1)


Trigger:
  • Enter Region C
    • Events
      • Unit - A unit enters Region C <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] + 1)
      • Set C_Int[(Player number of (Owner of (Triggering unit)))] = (C_Int[(Player number of (Owner of (Triggering unit)))] + 1)


Trigger:
  • Leave Region C
    • Events
      • Unit - A unit leaves Region C <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] - 1)
      • Set C_Int[(Player number of (Owner of (Triggering unit)))] = (C_Int[(Player number of (Owner of (Triggering unit)))] - 1)


Trigger:
  • Enter Region D
    • Events
      • Unit - A unit enters Region D <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] + 1)
      • Set D_Int[(Player number of (Owner of (Triggering unit)))] = (D_Int[(Player number of (Owner of (Triggering unit)))] + 1)


Trigger:
  • Leave Region D
    • Events
      • Unit - A unit leaves Region D <gen>
    • Conditions
    • Actions
      • Set Temp_Int[(Player number of (Owner of (Triggering unit)))] = (Temp_Int[(Player number of (Owner of (Triggering unit)))] - 1)
      • Set D_Int[(Player number of (Owner of (Triggering unit)))] = (D_Int[(Player number of (Owner of (Triggering unit)))] - 1)


Trigger:
  • Hero Set
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Int[(Integer A)] Equal to 3
            • Then - Actions
            • Set Temp_Int[(Integer A)] = 0
              • If ((A_Int[(Integer A)] Equal to 3) and ((B_Int[(Integer A)] Equal to 0) and ((C_Int[(Integer A)] Equal to 0) and (D_Int[(Integer A)] Equal to 0)))) then do (Unit - Create 1 Paladin for (Player((Integer A))) at (Center of Hero Spawn Point <gen>) facing Default building facing degrees) else do (Do nothing)
              • If ((A_Int[(Integer A)] Equal to 2) and ((B_Int[(Integer A)] Equal to 1) and ((C_Int[(Integer A)] Equal to 0) and (D_Int[(Integer A)] Equal to 0)))) then do (Unit - Create 1 Archmage for (Player((Integer A))) at (Center of Hero Spawn Point <gen>) facing Default building facing degrees) else do (Do nothing)
              • If ((A_Int[(Integer A)] Equal to 2) and ((B_Int[(Integer A)] Equal to 0) and ((C_Int[(Integer A)] Equal to 1) and (D_Int[(Integer A)] Equal to 0)))) then do (Unit - Create 1 Mountain King for (Player((Integer A))) at (Center of Hero Spawn Point <gen>) facing Default building facing degrees) else do (Do nothing)
              • If ((A_Int[(Integer A)] Equal to 2) and ((B_Int[(Integer A)] Equal to 0) and ((C_Int[(Integer A)] Equal to 0) and (D_Int[(Integer A)] Equal to 1)))) then do (Unit - Create 1 Blood Mage for (Player((Integer A))) at (Center of Hero Spawn Point <gen>) facing Default building facing degrees) else do (Do nothing)
            • Else - Actions
              • Do nothing



In that last trigger, just continue making if/then/else statements for each hero.
 

ballzdeep85

New Member
Reaction score
0
what is temp int supose to be?
is it an integer ?
if so what is its array size?

kinda at a loss there.

thankyou,
ballzdeep85
 

ballzdeep85

New Member
Reaction score
0
Never mind Totaly got it thankyou soooo much every one who helped awsome and quick help.

-UPDATE
oh yeah.
NOW....
How do i code it so after the hero is spawned that the units entering the regions die?
UPDATE-

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
BUMP
i totaly need to get it so that i can only spawn one hero at a time.

- so if there is a hero already spwand they cant spawn another one.
- the only way to spawn another hero is if the one they have dies.
-help how do i do that.

- i need it so after the hero is made for the player.
-that the units that enter the regions to trigger the spawn of the hero Die/explode

thankyou and please help.

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
how do i get it so each player can only spawn/have one hero on the feild at a time.

thankyou,
ballzdeep85.
 
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

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top