unit entering region with building help

Epicurus

New Member
Reaction score
1
I'm trying to have an action occur when a unit enters a region with a certain type of building that is owned by the same player that owns the tiggering unit.

I've tried a couple of thing (all of which I dont understand) and they didn't work. So I boiled it down to what I think makes sense. This is what I got so far.

Trigger:
  • Untitled Trigger 005
    • Events
      • Unit - A unit enters power up 01 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions


Any suggestions
 

jig7c

Stop reading me...-statement
Reaction score
123
Trigger:
  • Untitled Trigger 005
    • Events
      • Unit - A unit enters power up 01 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • <Building 001 gen> is in power up 01 equal to true
      • Owner of <building 001 gen> is equal to owner of (triggering unit)
    • Actions
 

Epicurus

New Member
Reaction score
1
Doesn't that need to building to be made from the start? I want the building to be made by the player in the game.
 

Epicurus

New Member
Reaction score
1
Doesn't Building 001 gen refer to a specific building, not just a building of that type?
 

Epicurus

New Member
Reaction score
1
Sorry to bring this back up, but I still have no way of making this work. I can't use a trigger that has you select a unit because I want the player to build it. If I use the select unit and then delete the unit the trigger is broken.
 

naughty

New Member
Reaction score
12
im bored of typing much so ill try to explain it as much easier

try making it with 2 triggers
the first one will be something like
Trigger:
  • Event
    • A unit enters playable map area
    • Condition
    • Entering unit equal to (your building)
    • Action
    • Add to (the other trigger) the event a unit comes within (some range)


and then u make the actions in the other trigger
 

Epicurus

New Member
Reaction score
1
Ok so its a little different than yours, but do you think this will work?

Trigger:
  • power 01 01
    • Events
      • Unit - A unit enters power up 01 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Science Facility
    • Actions
      • Trigger - Add to power 01 02 <gen> the event (Unit - A unit enters power up 01 <gen>)


Trigger:
  • power 01 02
    • Events
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Tome of Experience) Equal to False
        • Then - Actions
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Owner of (Triggering unit)))) the text: Hero ready
          • Hero - Create Tome of Experience and give it to (Triggering unit)
        • Else - Actions


Also, do I need to add to the if/then/else under condition -Hero has a empty slot? I don't know if it would know that automaticly.

One more thing how do I make sure that the owner of the triggering unit from 01 is the same owner of the triggering unit from 02?
 

Epicurus

New Member
Reaction score
1
Nothing? The triggers I have above work but, right now any player can get the item. I want only the player that built the structure to get the item.
 

naughty

New Member
Reaction score
12
dude look what u have just did

Events
Unit - A unit enters power up 01 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Science Facility
Actions
Trigger - Add to power 01 02 <gen> the event (Unit - A unit enters power up 01 <gen>)

you have added absolutely the same event in the next trigger which u dont even need 2 triggers to do that
 

Epicurus

New Member
Reaction score
1
I have to admit, I could make this work on my own, but there's a problem.

Here a way I know it will work (or atleast I think I know).

Trigger:
  • red power up 02
    • Events
      • Unit - A unit enters power up 02 &lt;gen&gt;
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Trigger - Turn on red hero 02 &lt;gen&gt;


Trigger:
  • red hero 02
    • Events
      • Unit - A unit enters power up 02 &lt;gen&gt;
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Do nothing


Trigger:
  • red power down 02
    • Events
      • Unit - A unit leaves power up 02 &lt;gen&gt;
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Trigger - Turn off red hero 02 &lt;gen&gt;


So, I think this will work but, I have a serious math problem.

8or10 (players) X 24 (regions) X 3 (amount of triggers) =576 to 720

So basically, I'm asking to have some kind of way of making the same affect with 72 triggers working for 8-10 players but not allowing player 3 to use player 4's building. Is this poissible or is there anyway to do it totally differentlly?
 

jig7c

Stop reading me...-statement
Reaction score
123
ur making this too complicated...
let me help you
in the map init trigger put this
set ScienceFacility = unit type of Science Facility

Trigger:
  • building
    • event
      • a unit enters power 01
    • condition
      • triggering unit is a hero equal to true
      • ScienceFacility is in power 01 equal to true (don&#039;t have WE on this comp, not sure about this one)
    • action
      • if
        • ((Triggering unit) has an item of type Tome of Experience) Equal to False
      • Then - Actions
        • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Owner of (Triggering unit)))) the text: Hero ready
        • Hero - Create Tome of Experience and give it to (Triggering unit)
 

Epicurus

New Member
Reaction score
1
ur making this too complicated...
let me help you
in the map init trigger put this
set ScienceFacility = unit type of Science Facility

Trigger:
  • building
    • event
      • a unit enters power 01
    • condition
      • triggering unit is a hero equal to true
      • ScienceFacility is in power 01 equal to true (don&#039;t have WE on this comp, not sure about this one)
    • action
      • if
        • ((Triggering unit) has an item of type Tome of Experience) Equal to False
      • Then - Actions
        • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Owner of (Triggering unit)))) the text: Hero ready
        • Hero - Create Tome of Experience and give it to (Triggering unit)

How do I make sure that the owner of triggering unit is the same as the owner of the science facility? I made a trigger very similar to that but couldn't find a way to make the owners the same.
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
well..its not complete ..but:
Trigger:
  • Untitled Trigger 022
    • Events
      • Unit - A unit enters No region
    • Conditions
    • Actions
      • Set region_loc = ***
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in region_loc matching (((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))) and ((Unit-type of (Matching unit)) Equal to ****)))) Greater than or equal to 1
          • ((Triggering unit) has an item of type Tome of Experience) Equal to False
        • Then - Actions
          • Item - Create Tome of Experience at (Position of (Triggering unit))
          • Hero - Give (Last created item) to (Triggering unit)
        • Else - Actions


its not done..because i cant figure out how to set a region variable to a specific region "region that the unit is entering" :/
 

grognog

New Member
Reaction score
1
try this
Code:
Events
-Unit enters Region 001 <gen>
Conditions
-(Region 001 <gen> contains ScienceFacility) equal to True
-((Entering Unit) is A Hero) equal to True
Actions
-Create Money!!! in (random point in Region 001 <gen>)
 

Epicurus

New Member
Reaction score
1
It's Epicurus'es Daily Topic Bump!
Brought to you by one guy that needs help with a specific problem.
Any help or are we going to go for a three day span of nothing? Stay tuned to find out!
 
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