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:
    Labor Day vacation is the best.
    +1
  • tom_mai78101 tom_mai78101:
    Make sure you keep checking out my news..
    +2
  • Jesus4Lyf Jesus4Lyf:
    Man, I made this account 15 years ago? Wild. :)
  • Ghan Ghan:
    Seeing J4L is definitely a blast from the past.
  • Jesus4Lyf Jesus4Lyf:
    Oh hey Ghan! Long time. :)
    +1
  • jonas jonas:
    J4L! What has happened in your life
  • Jesus4Lyf Jesus4Lyf:
    Hmm, how to summarize... Moved to the USA and got married. Became a professional software engineer and solution lead. Learning Godot for game dev. :)
  • jonas jonas:
    So you are pursuing game dev as a hobby? What industry is your dayjob in?
  • jonas jonas:
    FAANG?
  • Jesus4Lyf Jesus4Lyf:
    Not quite FAANG, less pay for a less hours/stress. Yeah, game dev as a hobby.
  • jonas jonas:
    makes sense. Do we have a hobby game dev subforum to showcase some work?
  • Blackveiled Blackveiled:
    Happy Thursday
    +1
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    TGIF!
  • The Helper The Helper:
    hey tom_mai please do not archive anymore news
  • Ghan Ghan:
    AMD Ryzen 7000 next week :D
    +1
  • The Helper The Helper:
    noice!
  • tom_mai78101 tom_mai78101:
    "hey tom_mai please do not archive anymore news" ----> Got it. What should we do with the "News Archive" subforum?
  • The Helper The Helper:
    I think leave it for real old news that cannot be sorted the reason we had it in the first place was a server issue that we do not have anymore. I don't want to get rid of the archive just not put anything in it for now until we figure it out more
  • The Helper The Helper:
    The side chat has nothing on the discord. it is not possible but the biggest thing on my wish list right now is a sidechat channel on the disord that hooks up to this...
  • Ghan Ghan:
    I've been selected for the Diablo IV beta.
    +1
  • Ghan Ghan:
    Woo!
    +1
  • The Helper The Helper:
    that is so cool
  • V-SNES V-SNES:
    Eh just noticed the new discord section on the side. Looks great!

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top