custom unit into a gate

Stretch

New Member
Reaction score
0
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
Reaction score
15
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
Reaction score
0
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
Reaction score
24
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
Reaction score
0
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.
Reaction score
159
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
Reaction score
0
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.
Reaction score
159
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
Reaction score
0
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)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Well that's strange... Unless you don't have a point variable named TempPoint.
 

Stretch

New Member
Reaction score
0
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
Reaction score
0
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
Reaction score
44
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.
Reaction score
159
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
Reaction score
0
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.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Create an account at HiveWorkshop.. Request for the model..
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
608
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:
    Happy Friday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday Night!
    +1
  • The Helper The Helper:
    Going out of a town for the weekend will be back sunday night! Hope everyone has a great weekend!
    +2
  • The Helper The Helper:
    Happy Monday!
  • Ghan Ghan:
    Monday? Speak for yourself. :p
    +2
  • The Helper The Helper:
    Happy Taco Tuesday!
    +1
  • The Helper The Helper:
    Tacos! :)
  • The Helper The Helper:
    Check out the discord for taco pictures :) You cannot put pictures in this chat
    +1
  • The Helper The Helper:
    Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
  • C cubanismo:
    Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
    +2
  • The Helper The Helper:
    One can only wish!
  • tom_mai78101 tom_mai78101:
    I'm back from Taiwan
    +1
  • The Helper The Helper:
    I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
  • The Helper The Helper:
    and the real archive lives off of headline news
  • The Helper The Helper:
    Happy Monday!
  • V-SNES V-SNES:
    Happy Saturday!
  • The Helper The Helper:
    Happy Saturday Night!

    The Helper Discord

    Staff online

    • Ghan
      Administrator - Servers are fun

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top