custom unit into a gate

Stretch

New Member
For some reason when I try to make a gate for my map every time I click the open button (from the open/close ability) it just opens the gate and it dies, Do i need to use a trigger to get it to work? also im having trouble making the vertical gate as in the model file both horizontal and verticle listed under same name and it only does the horizontal one :S

If anyone knows how to make it so these gates work that would be great

thanks in advance
 

0WN3D

New Member
I think you rly nid to trigger it
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Condition - Ability being cast equals to open gate
    • Actions
    • Destructible - Open Gate (Diagonal 2) 0015 (gen)

or something along that lines
 

Stretch

New Member
The problem is the gate isn't a destructible and I can't get the builders to be able to build a destructible. It's simply a unit which has had it's model modified to "gate (horizontal) <base>, gate (verticle) <base>".

If anyone knows how I could create another gate unit that has the door already open I could use a replace unit trigger to do it.
 

Whoareyou.

New Member
Well couldn't you
Condition - Units of type (Gate Unit)
Wait, how to open it.. Isn't there an open gate model where you got your closed gate model? If not i'll try looking and help you. :/
 

Stretch

New Member
Bumping an old post, not been around for a while and wanting to try fix this problem again.

No there is no open gate model.
 

skyblader

You're living only because it's illegal killing.
Are you using it as a unit because you want the ability button to open/close it? If so, you could really try putting a switch next to the gate, which is actually a unit/building with the open/close buttons, then when clicked, it'll open/close the destructible instead.

Otherwise, you can try killing the unit and reviving it to open/close.
 

Stretch

New Member
Well I want units to be able to build these gates wherever they wish, so yes using the open/close is what I need. This kinda means I cant use the switch idea but thanks. Could you explain more into how I would go about trying the killing unit and reviving please
 

skyblader

You're living only because it's illegal killing.
Hmmm.. Then you can do this instead.

Trigger:
  • Gates
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Gate
    • Actions
      • Set TempPoint = (Position of (Constructed structure))
      • Unit - Remove (Constructed structure) from the game
      • Destructible - Create a Demonic Gate (Horizontal) at (TempPoint) facing (Angle you want) with scale 1.00 and variation 0/1(Closed or open)
      • custom script: call RemoveLocation(udg_TempPoint)


This is just creating the destructible in place.

Edit:


Okay, so I tried to make the little system, but I can only build it, replace it, and open it with an ability. But I can't close it because an open gate is not selectable. Maybe creating a switch beside with the open/close would be good but it'll be hard for the triggers to automatically place it since you can build the gate ANYWHERE. Anyway, here are my triggers so far:

Trigger:
  • Hashtable
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • -------- Create and store the hastable --------
      • Hashtable - Create a hashtable
      • Set HashtableVar = (Last created hashtable)


Trigger:
  • Gates
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Gate
    • Actions
      • -------- Remove built building and replace with gate destructible. Save the owner of unit and make it unkillable. --------
      • Set TempPoint = (Position of (Constructed structure))
      • Unit - Remove (Constructed structure) from the game
      • Destructible - Create a Demonic Gate (Horizontal) at TempPoint facing (Random angle) with scale 1.00 and variation 0
      • Hashtable - Save (Player number of (Owner of (Triggering unit))) as 0 of (Key (Last created destructible)) in HashtableVar
      • Destructible - Set max life of (Last created destructible) to 1000000000.00
      • Destructible - Make (Last created destructible) Vulnerable
      • Custom script: call RemoveLocation(udg_TempPoint)


Trigger:
  • OpeningClosing Gates
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Open/Close Gate
    • Actions
      • -------- Load the number saved(Player number of owner of the gate) and check if the one opening or closing it belongs to the owner of the gate. If so, open the gate if its closed and close the gate if its open. --------
      • Set IntegerVar = (Load 0 of (Key (Target destructible of ability being cast)) from HashtableVar)
      • Set DestructibleVar = (Target destructible of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IntegerVar Equal to (Player number of (Owner of (Triggering unit)))
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DestructibleVar is invulnerable) Equal to True
            • Then - Actions
              • Destructible - Close DestructibleVar
              • Destructible - Make DestructibleVar Vulnerable
            • Else - Actions
              • Destructible - Open DestructibleVar
              • Destructible - Make DestructibleVar Invulnerable
        • Else - Actions


You will need a dummy building, the actual destructible, a targeting ability that does nothing to open and close the gates.

Note again: The closing won't work because you can't target the gate.
 

Stretch

New Member
Well I tried other ways around this and seem to have found nothing so far, I tried setting up yours to see if I could edit it in some way to make it work but for some reason that script crashed my world editor, thankfully I didn't lose too much ^^

Edit: this is the script that crashed it: custom script: call RemoveLocation(udg_TempPoint)
 

Stretch

New Member
Nope I had the variable set up and everything should of been fine, well I will keep fiddling with it and see what I can come up with. +rep for your help :)

If anyone else has a solution to this that would be great. :)
 

Stretch

New Member
Still having problems with this, bumping in hope someone will be able to help me out. Let me be clear by what I want, I need a gate which can be built by a builder and it can be built anywhere in the map, which can be opened and closed by the player that built it, also it needs to be able to be attacked.
 

TomTTT

New Member
create or download a model of a gate closed and opened. give the building the builder builds this closed model. when a unit casts the dummy ability called "Open" create instead of that another building that have the opened gate model. Give it the dummy ability "Close" then when someone cast it, you know...
 

skyblader

You're living only because it's illegal killing.
You can try searching... Hiveworkshop, here, or even google.. but I doubt they have models of just open gates, they usually do a gate, with both open and closed. Which will probably have the same problem... Maybe, you can try requesting for it on hiveworkshop.
 

Stretch

New Member
Another question regarding this, how would I go about aquiring the open model for the gate, the only one listed for the gates is the closed one.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Apparently, the Demonic Gate has a Death (Alternate) animation, which shows it as open. You could get it to play the Death (Alternate) animation when you cast the Open ability and play the Stand animation when you cast the Close ability.

It seems all gates have the Stand animation for closed, Death Alternate for opened and Death for when it breaks from being attacked.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    it is all percolating man
  • The Helper The Helper:
    TheHelper.net #1!
  • Wizard Wizard:
    #1
  • The Helper The Helper:
    LOL I love this place
  • Wizard Wizard:
    ;D
  • Wizard Wizard:
    We all do.
  • O Old Mountain Shadow:
    So what is next for thehelper.net? Is there a new set goals yet?
  • The Helper The Helper:
    yes we are going to be expanding
    +1
  • The Helper The Helper:
    help more people
  • The Helper The Helper:
    thank you for asking Old Mountain Shadow hell ya@
  • The Helper The Helper:
    Look at Mountain Shadow in the chat!
  • The Helper The Helper:
    welcome to thehelper.net
  • O Old Mountain Shadow:
    thanks although I'm really kind of regretting this name lol ... is there a way to change it out or will I need to make a new account?
    +1
  • Wizard Wizard:
    One of us can change it for you, I believe. Just send me a PM on what you want.
  • Ghan Ghan:
    Some day we should get the feature where you can change your own name.
  • Wizard Wizard:
    Soon!
  • The Helper The Helper:
    did the mountain shadow get his name changed? personally I think Old Mountain Shadow is a kickass name
  • The Helper The Helper:
    but what do i know lol
  • Wizard Wizard:
    No they haven't had their name changed, it is badass xD
    +1
  • O Old Mountain Shadow:
    Thanks, lol! I haven't quite come up with a good new one yet. I was gonna default to one of my older usernames: Cha Zui = tea drunk in Chinese but then decided it too didn't quite fit right. I'm not asian lol... But I am tall, and old spirited which is sort of where the Old Mountain Shadow came about.
  • O Old Mountain Shadow:
    Either way I appreciate the willingness to help me change it! Should I discover something better I'll swap it, but for now ill stay with what I got.
  • The Helper The Helper:
    If you want a change like they said earlier just let us know
    +1
  • Ghan Ghan:
    Patched and rebooted the server this morning.
  • Ghan Ghan:
  • The Helper The Helper:
    dam pwnkit what a name probably perfectly describes it

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top