• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Using 'right click' to send units through an auto-open gate.

Status
Not open for further replies.
Level 2
Joined
Apr 19, 2006
Messages
28
Hey everyone. :)

Here is my setup. I have some peeps in a pit with 1 gate. When they get close to the gate, it auto-opens. When they leave, it auto-closes.

problem: When I send a unit north-outside, west-outside, or south-outside of the pit, it runs to the north wall, west wall or south wall. It doesn't go to the gate (on the east wall) because it is not open yet and there is no path.

The action SHOULD go like this. I select a unit and right click the north part of the map. The unit runs to the east gate, where it opens, and then runs north.

Please let me know what you think. :) I appreciate your time and your skills!

-Miz
 
Level 2
Joined
Apr 19, 2006
Messages
28
ps. I posted a cheezy graphic to help with the explaination. :eek:

--Red arrows show what is happening.

--Blue arrows show what I want to happen.


-Miz
 

Attachments

  • my_cheezy_graphic_220.jpg
    my_cheezy_graphic_220.jpg
    14.3 KB · Views: 129
Level 5
Joined
Mar 11, 2006
Messages
195
Well its pretty easy why it happens, None of the units see a way to get out of the circle, so they move up to the wall. With the unit running east he will open the gate and will see he can run further and go through the gate, the other 3 units will simply be blocked by the wall. The only way i know to solve this is to make a hole instead of a gate. It mainly depends on the meaning of the game. Will the gate be under siege and does it have to be destroyed? Than there will be nothing to do about it. Is this gate only for show, make it walkable so it still will open but the units will see a path going each direction through the gate.
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
Hmm, If I got this rigth. First order them to enter the rect at the foor (If you have one. I quess thats how you made that auto open close thing). So, you order them to go there.

-Order unit to move to (Rect)


__________________________________

Unit enters (rect)
Order unit to move to (rect2)
 
Level 2
Joined
Apr 19, 2006
Messages
28
Thanks for the replies. I understand the reason why the troops move in this way. I understand how to get them through the gate. That isn't the issue. The gate needs to be locked when baddies come near. It needs to be functional. It needs to be smart.

1 possible answer:
The only answer I can think of is to make the gates open by default. Then, when a bad guy comes near, it closes. It will accomplish the same thing, will not lag the game but is not as real-world as it should be.

It may not be possible to do this in WC. If anyone knows how, I will be much impressed!!

Thanks again for sharing, guys! :)

-Miz
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
Make the gate in midle of a rect.

Melee Initialization
Events
Unit - A unit enters (Current camera bounds)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Destructible - Open Demonic Gate (Vertical) 0000 <gen>
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
Then - Actions
Do nothing
Else - Actions
 
Level 2
Joined
Apr 19, 2006
Messages
28
My gate auto-opens and closes fine. That is not my problem. Your trigger will not solve my problem. I don't know how to explain my problem any better than I have already. I really do appreciate your efforts to help me, though. :D Thanks Man!

I think I'll stick with my always-open-until-enemy-approaches solution.

If anyone knows how to do it the real-world way while allowing troops to attack-move like they normaly would, please post. Otherwise I'm good. Thanks, everyone!

-Miz
 
Level 5
Joined
Mar 11, 2006
Messages
195
Well there maybe is a trick:
Make 2 gates which look exactly the same but one is walkable and the other isnt.
Use the walkable one by default so the units will move the right direction, and the gate opens so no-one will ever see it is walkable. When an enemy approaches replace the gate with a nonwalkable one. When all enemies have been killed and no enemy is nearby replace it again with the walkable one.
I hope you can make the triggers yourself, else just ask. (edit my post has to be orange)
 
Level 2
Joined
Apr 19, 2006
Messages
28
NICE!!!!!!!

Darkdraak, you are the shit! :eek:

That is brilliant! It will be a simple trigger too, so it shouldn't lag the game. Thanks man. I'm doing it.

In awe of your skills,
-Miz
 
Status
Not open for further replies.
Top