trigger help

ghostknife

New Member
Reaction score
0
i want the door to open when a unit enters a distance of the door and i cant figure out what's wrong



Doors
Events
Unit - Any Unit Enters a distance of 5.0 from (Unit attached to Region 002)
Local Variables
Conditions
Actions
Unit - Activate Ability cooldowns on ability Supply Depot - Raise Copy (Supply Depot) on unit (Picked unit)

and then to close the door


Doors 2
Events
Unit - Any Unit Leaves a distance of 5.0 from (Unit attached to Region 002)
Local Variables
Conditions
Actions
Unit - Activate Ability cooldowns on ability Supply Depot - Raise Copy (Supply Depot) on unit (Picked unit)
 

Dave312

Censored for your safe viewing
Reaction score
269
Your problem will be that your region is not attached to a unit. There are two ways this can be fixed:

1) Remove your region completely and just use a Unit Enter/Leaves Range of Unit Event. In this case, your second unit parameter will be the door:
Trigger:
  • Events
    • Unit - Any Unit Enters a distance of 5.0 from Door

2) Keep your region and change the event to Unit Enter/Leaves Region.

The second option is probably easier given you have already created your regions but if you have multiple doors, then the first option allows you to avoid using regions.

EDIT: I also just realized that your action won't work. You need to Issue your door an Order to use the ability. Use the Issue Order action and set the order to Order with No Target and the Ability Command to Lower (Supply Depot).
 

ghostknife

New Member
Reaction score
0
like this?

Doors
Events
Unit - Any Unit Enters a distance of 2.0 from door [119.00, 118.00]
Local Variables
Conditions
Actions
Unit - Order (Triggering unit) to (Supply Depot - Lower Copy (Supply Depot)) (After Existing Orders)

still doens't work
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
Events
Unit - Any Unit Enters a distance of 5.0 from Supply Depot [89.00, 115.00]
Local Variables
Supply Depot = No Unit <Unit>
Conditions
Actions
Variable - Set Supply Depot = Supply Depot [89.00, 115.00]
Unit - Order Supply Depot to (Supply Depot - Lower (Supply Depot)) (Before Existing Orders)

That worked for me, dunno if its what your looking for however
 

Dave312

Censored for your safe viewing
Reaction score
269
Doors
Events
Unit - Any Unit Enters a distance of 2.0 from door [119.00, 118.00]
Local Variables
Conditions
Actions
Unit - Order (Triggering unit) to (Supply Depot - Lower Copy (Supply Depot)) (After Existing Orders)

still doens't work

Triggering unit is the unit entering the range of the door. In your action, you need to specify the door rather than the Triggering Unit. Hence it should look like this:
Trigger:
  • Doors
    • Events
      • Unit - Any Unit Enters a distance of 2.0 from door [119.00, 118.00]
    • Local Variables
    • Conditions
    • Actions
      • Unit - Order door [119.00, 118.00] to (Supply Depot - Lower Copy (Supply Depot)) (After Existing Orders)
 

Dave312

Censored for your safe viewing
Reaction score
269
Well you could always try to do it through the data editor and use an Interact ability which has the effect of Issue Order to open the door. I haven't really looked into whether that is possible though.
 

ghostknife

New Member
Reaction score
0
new trigger try

door1
Events
Unit Selection - Any Unit is Selected by player Any Player
Local Variables
Conditions
(Unit type of (Triggering unit)) == door
Actions
Unit - Order (Picked unit) to (Supply Depot - Lower Copy (Supply Depot)) (Before Existing Orders)
General - Wait 10.0 Real Time seconds
Unit - Order (Picked unit) to (Supply Depot - Raise Copy (Supply Depot)) (Before Existing Orders)
 

ghostknife

New Member
Reaction score
0
good idea but

Well you could always try to do it through the data editor and use an Interact ability which has the effect of Issue Order to open the door. I haven't really looked into whether that is possible though.


tryed that... this seemed more easier
 

ghostknife

New Member
Reaction score
0
yeah!!

fixed it il show trigger


door1
Events
Unit Selection - Any Unit is Selected by player Any Player
Local Variables
Conditions
And
Conditions
((Triggering unit) is visible to player (Triggering player)) == true
(Unit type of (Triggering unit)) == door
Actions
Unit - Order (Triggering unit) to (Supply Depot - Lower Copy (Supply Depot)) (Before Existing Orders)
General - Wait 10.0 Real Time seconds
Unit - Order (Triggering unit) to (Supply Depot - Raise Copy (Supply Depot)) (Before Existing Orders)

not that u guys dint help me:p
 
General chit-chat
Help Users

      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