| 07-08-2003, 05:37 PM | #1 |
Hi, i'm kind of poop with scripting in WE and wondered how I would go about making a normal human gate to open and close when MY units go near it? Anbody? |
| 07-08-2003, 05:46 PM | #2 |
Listen: 1. Create a trigger named "opengate 1" or something. 2. Create a region named opengate 1 or something, which is centered on the gate. 3. Make a Event like "A unit comes within 500 on your region 4. Condition: Owner of unit is player [number] 5. Action. First, make a If/Then/Else. If = your door is dead Then = skip remaining actions. Else = do nothing. 6. next action. open door. 7. next action. wait 5+ seconds 8. next action. close door. There are some alternatives but this is the easiest, I think.. |
| 07-08-2003, 05:51 PM | #3 |
thanks, i'll give that a try EDIT yup that worked, thanks for the help, triggering seems less complicated now ^_^ |
| 07-08-2003, 06:33 PM | #4 |
Don't mention it. Also, the If/Then/Else trigger is there because if the gate's destroyed and you move into range, it will just create a new gate there and open it, which is undesirable. |
| 07-08-2003, 07:10 PM | #5 |
Actually... Skip the last part about closing the doors... Make a new trigger... E: Unit leaves opengate 1 <gen> <-- or whatever you named it C: Your door is alive = true A: Wait 1 second or something similar Close your gate Regards Dead-Inside (At moms with 56k... Greeeaaat... No WC3 either) |
| 07-08-2003, 08:10 PM | #6 |
well actually I made the gate invincible anyway, so i'll stick with Electric's method |
| 07-08-2003, 09:33 PM | #7 |
... What? My method is more reliable in the way that people can't magically slip in after your hero has passed trough. |
| 07-08-2003, 09:56 PM | #8 |
Perhaps, but also, it's like in reality. I mean, how many generals haven't tried to get the enemies to open the gates themselves? Still, you've a point. But I think "my" system will suffice. |
