Gate Problem

storgaard

New Member
Reaction score
4
so... yet again im here, and ive been searching alot since last post on the forum, and it seems like nobody can make this work, atleast i havnt seen 1 single post that have ended with a clear answer of what needs to be.
its pretty simple, its the building gates problem.
What i want, is pretty simple its just to have a gate that can open close.. ive been meny places looking for it, from metaphobius(made game crash) to upgradding units, but i just cant seem to get find the answer, ive find a way to make it open, but than i cant change the pathing, with the same method, i dont know if im on the right track, but take a look on this.

Trigger:
  • Open gate
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Open Gate
    • Actions
      • Animation - Play (Casting unit)'s death animation
      • Animation - Play (Casting unit)'s Alternate animation
pretty simple, and it makes the gate open but after i found out that it is not possible to change the pathing this way.
If you got the golden idea of how to resolve this trigger, or just another way that somehow havnt been telled, im really open because this problem, just seems to be unresolveable on this forum, and it always end with alot of bumping and no answers.
 

Romek

Super Moderator
Reaction score
963
Try removing collision or replacing the gate unit with another gate unit without pathing.
 

XeNiM666

I lurk for pizza
Reaction score
138
Hmmm..

1. You can make a unit, lets say a guard, that stands near the gate.
2. Replace the gate with a destructible and not a unit.
3. Give the guard an ability to sell units. The guard can now sell a unit named "Open Gate"
4. Trigger that when you buy that specific unit, it will open the gate via Destructible - Open (Gate)

EDIT:
Lol 3 posts while posting this one. XD
 

storgaard

New Member
Reaction score
4
Try removing collision or replacing the gate unit with another gate unit without pathing.

Collision= not working, it only works on units, not buildings im afraid.
replacing the unit, im pretty sure i already tried that, but problem with this is, that if a unit is standing under, it will move when replaced, and thats really bad since a gate that suddenly moves 1 meter away from the walls isnt very effektive ;) and i think, even if it didt do that, it will cause the game to crash(i tried something like it, but it didt move it just crashed game instantly)

EDIT: i dont think the guard thing is what im looking for, but im gonna check out the link you sended, until than just keep on coming up with ideas, maybe you will find a thing i havnt tried :)
EDIT: its a long guide, and i will have a answer on it later tonight, it seems like a good guide so i hope it will work. i will post the answer so other can look in here for the answer, so the next dosnt have to stumple into the same problem again.
 

storgaard

New Member
Reaction score
4
working, but even more complicated?

so.... i quess it worked... atleast, somehow, my Horizontal Gates is working perfektly, with alot of help from that golden link :) but theres still one problem... somehow the Vertical gate is giving me problems, its like that the pathing dosnt work on it, because when closed people can walk thru, exept only that little spot in the middle, + it keeps on moving if people stands on, it its like the triggers isnt working for it: heres the triggers and above is the link :)
Trigger:
  • V Rotate
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Gate (Close)(Vertical)
    • Actions
      • Set VertLocation = (Position of (Constructed structure))
      • Unit - Remove (Constructed structure) from the game
      • Unit - Create 1 Gate (Close)(Vertical) for (Owner of (Constructed structure)) at VertLocation facing 0.00 degrees
      • Custom script: call RemoveLocation(udg_VertLocation)

Trigger:
  • V Open Gate
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Open Gate Vertical
    • Actions
      • Unit - Replace (Casting unit) with a Gate (Open)(Vertical) using The old unit's relative life and mana
      • Animation - Play (Last replaced unit)'s Death Alternate animation

Trigger:
  • V Close Gate
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Close Gate Vertical
    • Actions
      • Region - Center VertDetect <gen> on (Position of (Casting unit))
      • Region - Center VertLeft <gen> on ((Position of (Casting unit)) offset by (-100.00, 0.00))
      • Region - Center VertRight <gen> on ((Position of (Casting unit)) offset by (100.00, 0.00))
      • Set VertLP = ((Position of (Casting unit)) offset by (-300.00, -200.00))
      • Set VertRP = ((Position of (Casting unit)) offset by (300.00, 200.00))
      • Wait 0.02 seconds
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in VertDetect <gen> matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A ground unit) Equal to True))) and do (Actions)
        • Loop - Actions
          • If ((VertLeft <gen> contains (Picked unit)) Equal to True) then do (Unit - Move (Picked unit) instantly to VertLP) else do (Do nothing)
          • If ((VertRight <gen> contains (Picked unit)) Equal to True) then do (Unit - Move (Picked unit) instantly to VertRP) else do (Do nothing)
      • Wait 0.02 seconds
      • Custom script: call RemoveLocation(udg_VertRP)
      • Custom script: call RemoveLocation(udg_VertLP)
      • Unit - Replace (Casting unit) with a Gate (Close)(Vertical) using The old unit's relative life and mana
      • Animation - Play (Last replaced unit)'s stand animation

sorry for the long waitime, but its some hell of a busy days ;)
EDIT: oh and ye, how what needs to be changed when scalling the unit down? because its huge, and i did´t quite see from the way he explained it, how its possible to change the scale of the unit, without damaging the triggers, or what needs to be changed in the triggers, and what exatly, when changing the units size.
 

Piranha

New Member
Reaction score
0
Upgrade?

Hey!
I am also making a map with build-able gates, and had the same problem as you :banghead:
However, I saw a guy somewhere in this forum say:
"Just do a upgrade..."
I worked a little into the idea, and found that if you make the gate simply upgrade to a open gate, you can skip alot of the hard trigger work :D
The only problem is that you yourself have to make it show the animations, but that is significantly easier than most of the triggers...
1: You dont have to worry about misplacing the structure when you change the pathing, as the building is so to speak "already built" and automatically moves the unit when upgraded(I have checked but please say if I am wrong)
2:You only have to do 1 trigger.
Events: A unit Finishes an upgrade.
Conditions: (Unit-type of (Triggering unit)) Equal to Gate(Horizontal Open)
Actions: Animation - Play (Triggering unit)'s Death animation animation
Animation - Play (Triggering unit)'s alternate animation animation
I don't think it memory leaks...
One problem is that you're not able to make different build and upgrade tooltips.
Anyways, I wont take credit for this but I can't remember who came up with the original idea. Hope it helps :) (If it does, I could make a thread about it, as it appears that many has the same problem)...
Oh, and this may not at all be the real solution as I may have overlooked something :confused:
 

storgaard

New Member
Reaction score
4
Hey!
I am also making a map with build-able gates, and had the same problem as you :banghead:
However, I saw a guy somewhere in this forum say:
"Just do a upgrade..."
I worked a little into the idea, and found that if you make the gate simply upgrade to a open gate, you can skip alot of the hard trigger work :D
The only problem is that you yourself have to make it show the animations, but that is significantly easier than most of the triggers...
1: You dont have to worry about misplacing the structure when you change the pathing, as the building is so to speak "already built" and automatically moves the unit when upgraded(I have checked but please say if I am wrong)
2:You only have to do 1 trigger.
Events: A unit Finishes an upgrade.
Conditions: (Unit-type of (Triggering unit)) Equal to Gate(Horizontal Open)
Actions: Animation - Play (Triggering unit)'s Death animation animation
Animation - Play (Triggering unit)'s alternate animation animation
I don't think it memory leaks...
Anyways, I wont take credit for this but I can't remember who came up with the original idea. Hope it helps :) (If it does, I could make a thread about it, as it appears that many has the same problem)...
Oh, and this may not at all be the real solution as I may have overlooked something :confused:
I think it was a guy who said that in one of previus threads, but somehow it didt work :/

EDIT: but back to my triggers, can anyone find the leak?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top