HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Gate System

02-28-2005, 11:16 PM#1
paperclip
I want to make a custom gate which includes and does the following:
-Has two abilities:
--Open
--Close
When you click open ability the gate opens duh
When you click close the gate closes of course.

Not sure how to do this and i'm not sure if it has any triggers in it i'm just wonderring how to do it for my game.
02-28-2005, 11:33 PM#2
Yoz
You need to make a unit next to the gate or somthing that has abilities which open/close the gate.

Code:
Events
     Unit - A unit begins casting an ability
Conditions
     (Ability being cast) Equal to Open Door
Events
     Destructible - Open Door 0001 <gen>
Code:
Events
     Unit - A unit begins casting an ability
Conditions
     (Ability being cast) Equal to Close Door
Events
     Destructible - Close Door 0001 <gen>

You can make it so that the unit with the open/close abilities has the select unit or select hero ability so that nearby units can use the abilities.

As far as making a door a unit, I'm not really sure...
02-28-2005, 11:39 PM#3
yuripro84
or you could make it so that it opens off typing?

when player 1(red) says XXX

Destructible-open gate XXX <gen>

im not sure if theres a code that specifies if reds saying it, so for condition, add that triggering playe is equal to red. I like this better, but its your desicion ^_^ You can also do it so when they step over a platform, it does it.

When a unit comes within XXX of unit XXX

Open Gate XXX

Just a couple of suggestions ^_^
02-28-2005, 11:54 PM#4
Guest
To make the gate automatically open/close you can use regions and use "enter region" and "leave region" events, followed by the appropriate open/close destructible action as was described above by others.