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.
  • tom_mai78101 tom_mai78101:
    I have a GIF though
  • tom_mai78101 tom_mai78101:
    In the GIF, I've configured it so the lower the "Main Value" is, the better. I had to compress it pretty far down though.
  • tom_mai78101 tom_mai78101:
    And this is the thread with the video that shows the wall clip. https://tasvideos.org/Forum/Topics/23453
    +2
  • tom_mai78101 tom_mai78101:
    Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
  • tom_mai78101 tom_mai78101:
    What do we do with the Home page?
  • Ghan Ghan:
    I added those forums to the filter for that widget.
    +1
  • tom_mai78101 tom_mai78101:
    Oh nice. They're back. Thanks.
  • tom_mai78101 tom_mai78101:
    Now I think it makes more sense for me to put news in their own subforums, without worry.
  • The Helper The Helper:
    Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
  • tom_mai78101 tom_mai78101:
    Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
  • The Helper The Helper:
    If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
  • tom_mai78101 tom_mai78101:
    What if you move the permanent redirect, not the thread?
  • The Helper The Helper:
    I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
  • The Helper The Helper:
    if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
  • The Helper The Helper:
    Happy Early Friday :)
    +1
  • V-SNES V-SNES:
    Happy Friday :)
  • tom_mai78101 tom_mai78101:
    Fun Friday for me
  • tom_mai78101 tom_mai78101:
    Happy Fun Friday to all.
    +2
  • The Helper The Helper:
    Happy Sunday everyone!!!
  • V-SNES V-SNES:
    Happy Sunday!!!
    +1
  • jonas jonas:
    Happy monday :p
  • jonas jonas:
    Everyone hates mondays?
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • jonas jonas:
    Happy belated tuesday

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top