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.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top