Same Races ? (Trigger Help) ?

LaZyNation43

New Member
Reaction score
2
Hello

I have a question.. I am currently working on a mode called "Same Races"
What this does is it waits until Player 1 (Red) constructs a tower, a specific tower, out of 64. One of those 64 towers will be constructed, and then I want Player 2, 3, 4, 5, and 6, to get the same constructed structure at their own personal region.

This is what I have right now.. it works, but I would have to do this about 385 times.. I'm trying to figure out an easier way to work this.

Code:
Same Race
    Events
        Unit - A unit owned by Player 1 (Red) Finishes construction
    Conditions
    Actions
        If ((Unit-type of (Constructed structure)) Equal to Footman) then do (Unit - Create 1 (Unit-type of (Constructed structure)) for Player 2 (Blue) at (Center of Blue Random Spawn <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)

Sigh.. any ideas how to do this in an easier way without having to copy/paste this 384 more times and change the data? :confused:
 

Emu.Man00

New Member
Reaction score
41
are there any towers that you DONT want this to work for?

you can simply take the if part out, then youd only need the action five times :3

>>and if im understand this right its a tower u build once that chooses your race, so if you want this to only run for the first tower simply add

"trigger-turn off this trigger"

at the end of it
 

Chewbalka

New Member
Reaction score
14
is there specific player conversions?
or is it if player 1 makes something all players get the same unit?


events
unit - a unit owned by player 1 finishes construction
unit - a unit owned by player 2 finishes construction
unit - a unit owned by player 3 finishes construction
unit - a unit owned by player 4 finishes construction
unit - a unit owned by player 5 finishes construction
unit - a unit owned by player 6 finishes construction

actions
unit - creat 1 of (constructed unit) at center of ....

maybe that?
 

Emu.Man00

New Member
Reaction score
41
i understood it as player 1 decides the race and everyone has the same, based on his math (64 races * 6 players) Otherwise you'd be looking at a number more like 2300, as opposed to 380
 

LaZyNation43

New Member
Reaction score
2
Nah I need it to work for all 64 races.

Eh... I'm trying to figure out how to make it so where red can build any one of these towers and then the tower he builds will be summoned at 5 regions, one for blues spawn, teals spawn, yellows spawn, oranges spawn, and purples spawn.






Yeah.. I would have to do this 384 times, because 64*6=384.. 64 races.. 6 players. or 64*5 which is 320.. but there must be an easier way to do this, right?
 

Emu.Man00

New Member
Reaction score
41
Code:
Melee Initialization
    Events
        Unit - A unit owned by Player 1 (Red) Finishes construction
    Conditions
    Actions
        Unit - Create 1 (Unit-type of (Constructed structure)) for Player 2 (Blue) at (Center of (blue region)) facing Default building facing degrees
        Unit - Create 1 (Unit-type of (Constructed structure)) for Player 3 (Teal) at (Center of (teal region)) facing Default building facing degrees
        Unit - Create 1 (Unit-type of (Constructed structure)) for Player 4 (Purple) at (Center of (purple region)) facing Default building facing degrees
        Unit - Create 1 (Unit-type of (Constructed structure)) for Player 5 (Yellow) at (Center of (yellow region)) facing Default building facing degrees
        Unit - Create 1 (Unit-type of (Constructed structure)) for Player 6 (Orange) at (Center of (Orange region)) facing Default building facing degrees
        Trigger - Turn off (This trigger)

does this not work?
 

LaZyNation43

New Member
Reaction score
2
are there any towers that you DONT want this to work for?

you can simply take the if part out, then youd only need the action five times :3

>>and if im understand this right its a tower u build once that chooses your race, so if you want this to only run for the first tower simply add

"trigger-turn off this trigger"

at the end of it



Thanks! Problem solved. :)

I didn't understand you at first but i made it and it works
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Hello

I have a question.. I am currently working on a mode called "Same Races"
What this does is it waits until Player 1 (Red) constructs a tower, a specific tower, out of 64. One of those 64 towers will be constructed, and then I want Player 2, 3, 4, 5, and 6, to get the same constructed structure at their own personal region.

This is what I have right now.. it works, but I would have to do this about 385 times.. I'm trying to figure out an easier way to work this.

Code:
Same Race
    Events
        Unit - A unit owned by Player 1 (Red) Finishes construction
    Conditions
    Actions
        If ((Unit-type of (Constructed structure)) Equal to Footman) then do (Unit - Create 1 (Unit-type of (Constructed structure)) for Player 2 (Blue) at (Center of Blue Random Spawn <gen>) facing Default building facing (270.0) degrees) else do (Do nothing)

Sigh.. any ideas how to do this in an easier way without having to copy/paste this 384 more times and change the data? :confused:

You could save some time by removing the if-then condition.


Code:
Same Race
    Events
        Unit - A unit owned by Player 1 (Red) Finishes construction
    Conditions
    Actions
        [del]If ((Unit-type of (Constructed structure)) Equal to Footman) then do ([/del]Unit - Create 1 (Unit-type of (Constructed structure)) for Player 2 (Blue) at (Center of Blue Random Spawn <gen>) facing Default building facing (270.0) degrees[de]l) else do (Do nothing)[/del]

If you want to make sure it's one of those 64 buildings, do something like this:

Code:
Same Race
    Events
        Unit - A unit owned by Player 1 (Red) Finishes construction
    Conditions
        Or - Any conditions are true
            Conditions
                (Unit type of (Constructed structure)) equal to Footman
                (Unit type of (Constructed structure)) equal to Grunt
                (Unit type of (Constructed structure)) equal to Arthas The Action Figure Building
            .......... and so on........
    Actions
        Unit - Create 1 (Unit-type of (Constructed structure)) for Player 2 (Blue) at (Center of Blue Random Spawn <gen>) facing Default building facing (270.0) degrees

Then, to avoid having to create more triggers:

Code:
Initialization
    Events
        Map Initialization
    Conditions
    Actions
        Set PlayerRegion[1] = (Center of Red Random Spawn <gen>)
        Set PlayerRegion[2] = (Center of Blue Random Spawn <gen>)
        Set PlayerRegion[3] = (Center of Teal Random Spawn <gen>)
        Set PlayerRegion[4] = (Center of Purple Random Spawn <gen>)
        Set PlayerRegion[5] = (Center of Yellow Random Spawn <gen>)
        Set PlayerRegion[6] = (Center of Orange Random Spawn <gen>)

Here we set all the centers of the spawn regions, so that we can loop through them, as we can loop through players.

Code:
Same Race
    Events
        Unit - A unit owned by Player 1 (Red) Finishes construction
        Unit - A unit owned by Player 2 (Blue) Finishes construction
        Unit - A unit owned by Player 3 (Teal) Finishes construction
        Unit - A unit owned by Player 4 (Purple) Finishes construction
        Unit - A unit owned by Player 5 (Yellow) Finishes construction
        Unit - A unit owned by Player 6 (Orange) Finishes construction
    Conditions
        Or - Any conditions are true
            Conditions
                (Unit type of (Constructed structure)) equal to Footman
                (Unit type of (Constructed structure)) equal to Grunt
                (Unit type of (Constructed structure)) equal to Arthas The Action Figure Building
            .......... and so on........
    Actions
        For each (Integer A) from 1 to 6 do (Actions) -- [B]Loop through players and their respective spawn locations[/B]
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Triggering Player) is not equal to (Player(Integer A)) -- [B]So that One player does not get a second building after building one.[/B]
                    Then - Actions
                        Unit - Create 1 (Unit-type of (Constructed structure)) for (Player(Integer A)) at PlayerRegion[(Integer A)] facing Default building facing (270.0) degrees -- [B]Create 1 of the constructed units for every player except the triggering player, at each player's region.[/B]

Needs a Point variable with the "Array" box checked. Name it "PlayerRegion"

EDIT: Ah, problem was solved while I was answering. :p I also missed the part where you said you only wanted it for player 1 (Red), sorry.
 
General chit-chat
Help Users
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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