Klein~
TH.net Regular
- Reaction score
- 0
I spent a bit of time thinking and trying on how would I do that, but it's been kinda trouble. So I came here to ask the community.
PLEASE, READ THE TOPIC!!!
Ok, first, I'll try to explain what I wanna do and what I expect:
Place multiple Gates of like 4 types, let's say 'Diagonal 1', 'Diagonal 2', 'Horizontal', 'Vertical'.
If a unit enter in 300.00 range of any type of those gates then -> open the gate that the unit is near of for howlong there are units within this range and interval of 5 seconds after the game check that there aren't units within this range.
What I expect and tried to do:
Make dummies to be used to catch 'Within range' option.
Place dummies on every gate I wanna open, not meaning to care about types, just those I want.
In initialization trigger, pick every unit matching condition that unit-type is equal to dummy type and set picked units equal to GateOpenDummy.
Idk if I should use 'Triggering unit' to refer the unit(dummy) and not the entering unit.
Then add on map initialization trigger this line:
GateOpenDummy = picked units
Now I know that if a unit enter in the trigger range, the 'nearest' gate, near the dummy that this unit has entered in range of, will open as i wished.
It hasn't worked and I didn't think of a way to make the gate opened for a while as I wanna do.
Thanks.
PLEASE, READ THE TOPIC!!!
Ok, first, I'll try to explain what I wanna do and what I expect:
Place multiple Gates of like 4 types, let's say 'Diagonal 1', 'Diagonal 2', 'Horizontal', 'Vertical'.
If a unit enter in 300.00 range of any type of those gates then -> open the gate that the unit is near of for howlong there are units within this range and interval of 5 seconds after the game check that there aren't units within this range.
What I expect and tried to do:
Make dummies to be used to catch 'Within range' option.
Place dummies on every gate I wanna open, not meaning to care about types, just those I want.
In initialization trigger, pick every unit matching condition that unit-type is equal to dummy type and set picked units equal to GateOpenDummy.
Trigger:
- Gates
- Events
- Conditions
- Actions
- Destructible - Pick every destructible within 300.00 of (Position of (Triggering unit)) and do (Actions)
- Loop - Actions
- Destructible - Open (Picked destructible)
- Loop - Actions
- Destructible - Pick every destructible within 300.00 of (Position of (Triggering unit)) and do (Actions)
Idk if I should use 'Triggering unit' to refer the unit(dummy) and not the entering unit.
Then add on map initialization trigger this line:
Trigger:
- Trigger - Add to Gates <gen> the event (Unit - A unit comes within 300.00 of GateOpenDummy)
GateOpenDummy = picked units
Now I know that if a unit enter in the trigger range, the 'nearest' gate, near the dummy that this unit has entered in range of, will open as i wished.
It hasn't worked and I didn't think of a way to make the gate opened for a while as I wanna do.
Thanks.