• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Problem With Gates?

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2005
Messages
73
Attempting to create an RPG map in sc2, Theres a few things Im having trouble with since Im not used to the data editor. Anyway I have Increased the site of the model for the

"Field Gate (Straight Horizontal BF)" , and "Field Gate (Straight Vertical LF)"

Now I have a trigger that Opens and closes those gates (by using Order Unit (Open/Close))

However It would seem that If I open and close the gate more then 3-5 times It sticks open, And each time It opens Or Closes The Gate gets moved offset to the Right (East).

EDIT: I just found out that IT ONLY does this For my Horizontal gates, And im thinking now they stick open because they move too close too another unit but Im not really sure

  • Gate Open North
    • Events
      • Unit - Any Unit Enters a distance of 3.0 from Gate (Straight Horizontal BF) [128.00, 142.00]
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) != 15
    • Actions
      • Variable - Set GateUnits[0] = (GateUnits[0] + 1)
      • Unit - Order Gate (Straight Horizontal BF) [128.00, 142.00] to ( Open Gate) (Replace Existing Orders)
Thats for Opening The Gate

  • Gate Close North
    • Events
      • Unit - Any Unit Leaves a distance of 3.0 from Gate (Straight Horizontal BF) [128.00, 142.00]
    • Local Variables
    • Conditions
      • (Owner of (Triggering unit)) != 15
    • Actions
      • Variable - Set GateUnits[0] = (GateUnits[0] - 1)
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • GateUnits[0] == 0
        • Then
          • Unit - Order Gate (Straight Horizontal BF) [128.00, 142.00] to ( Close Gate) (Replace Existing Orders)
        • Else
thats for closing it.


Since I have very little of an idea as to how the data editor works and barely noticed i had succeeded in increasing the size of the unit Im assuming that its the cause of my moving Gate. However I no longer remember what it was that i changed I Will take a look at it and see whats up.

PS:While Im at it, Might as well ask this as well.
How Do i center the view of a player over a point on the map? When i use
  • Center Camera
    • Events
      • Timer - Elapsed time is 5.0 Game Time seconds
    • Local Variables
      • PlayerNumber = 0 <Integer>
    • Conditions
    • Actions
      • Player Group - For each player PlayerNumber in (All players) do (Actions)
        • Actions
          • Camera - Make the camera look at (Center of (Entire map)) for player PlayerNumber over 0.0 seconds with Existing Velocity% initial velocity, 0% deceleration
The Camera Tweaks out and views the map at a really weird angle (Like I am focused on the middle of the map but at such a harsh angle/distance that I cant Actually do anything and lag like nuts due to 40% of the Map being shown at one time)
 

Attachments

  • EditorTest.SC2Map
    554.4 KB · Views: 61
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
However It would seem that If I open and close the gate more then 3-5 times It sticks open, And each time It opens Or Closes The Gate gets moved offset to the Right (East).
Sounds like an actor problem (maybe even a message leak). The moving gate problem is due to collision and the new form of the gate colliding with the old for a prief period.

The camera problem is due to you not specifying what angle it should be. Try setting a camera object above the middle of the map and moving to it.
 
Level 4
Joined
Jan 14, 2005
Messages
73
Well Could u explain What i need to do Since im using the default open/close gate abilities and I have NO idea really how to use the data editor (Im still having alot of trouble wraping my head around it. Im slowly figuring it out but its a bit 2 slow for me to fix this problem without knowing exactly what Id need to change)

The Wierd thing is My Verticle Gates Do not move at all. Is it possible its being caused my My custom Pathing? (I had to increase the pathing Size since the Gates bigger or at least I assumed I did)

Again i have no idea how the data editor really works and had alot of trouble creating my first unit (attacks and what not) and for that I used a tutorial which im probably going to have to use again. (Im more of a trigger person anyway). The reason I posted my map file was because im having trouble figuring out what in the editor would cause it to do what it is doing. Please Help

I will however try to figure out the camera stuff on my own Thank you for the Tip DSG.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I advise checking the size of the Footprints used by the northern gate. You will soon realise that the lowered form is smaller than the raised form which is why it is moving and why it eventually stops working (cause it gets stuck in a cliff).

To fix, make the lowered form pathing map the same size as the raised form pathing map (with the appropiate pieces cut away). Incase you do not understand, I am refering to grid size (number of pathing cells in the footprint). Just because they appear about the same size when editing them onscreen does not mean they are the same size as actual size is governed by the pathing cells (individual squares).

There is a way to make gates open automaticly without any scripting at all using the enumerate area validator on the morph ability with the appropiate set flag. If this is more efficient or not I do not know.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Rispetto, I solved this problem... The footpring the open gate was using is a different size from the footprint the close gate was using. This caused the gate to move every morph. The gate would eventually be unable to morph when it embeded itself into a cliff.
 
Level 4
Joined
Jan 14, 2005
Messages
73
Ya Thanks Dr Super Good I did Manage to fix it. I didnt know that The footprint could cause that to happen. Good to know.

I havent Figured out how to open/Close the gates without scripting though, And I assume even if i did manage to make that work They would close on a 2nd person attempting to follow the first person through the gate, as well as allow the Creeps/Enemy units to go through the gate
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I havent Figured out how to open/Close the gates without scripting though, And I assume even if i did manage to make that work They would close on a 2nd person attempting to follow the first person through the gate, as well as allow the Creeps/Enemy units to go through the gate

Apparently DrSuperEvil has made a data editor only working gate over at SC2mapster. Although its exact support is unclear I imagine he has resolved all the logical issues you are concerned about.

As it is your scripted solution is probably far from perfect. The morphing delay makes it possible for me to get a gate to remain closed despite walking right up to it. Also, have you made sure summons and unit deaths do not mess up the counter?
 
Status
Not open for further replies.
Top