[Solved]Designate area as 'High Ground' without using cliff tool?

Discussion in 'Starcraft 2 (SC2) Editor Help' started by Kanoobee, May 17, 2014.

  1. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    I would like to have the mechanics of high ground in an area without using the cliff tool.

    Is this possible in the editor?

    Example:
    So because of the limitation on ramps(types of ramps) and also the shape and height of cliffs, I would like to make my own cliffs using the 'Height' tool. But I would still like these self made cliffs to have the high ground mechanics(the most desired one would be the effect of not being able to see up on the high ground while giving those on the cliff to see everything still.

    Thanks,
    Kanoobee
     
  2. Varine

    Varine And as the moon rises, we shall prepare for war

    Ratings:
    +832 / 11 / -1
    You could use pathing and visibility blockers. But triggers would look better. Easy way, set up regions and define fields of high/low ground with the added effects you want.
     
  3. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    Thank-You!

    So I am in the triggers now, looking for the right trigger and I had an idea since it doesn't look like setting a region specifically as 'high ground' is a built in feature.

    This is my idea, could I make it so that fog covers a specific region UNLESS you are standing in that region? I am looking for a way to do this now, but I am new to this, so it might be a while. If I find out how, I'll come back and post it. But if anyone already knows how, I wouldn't be angry if you shared it with me.

    Thanks!
    Kanoobee
     
  4. Varine

    Varine And as the moon rises, we shall prepare for war

    Ratings:
    +832 / 11 / -1
    No, its not a built in function. There is a visibility action I think, I don't have Warcraft installed so I can't go look at it. But it would be something along those lines. The Hive might have a system like that already built, I'm not sure but it would be worth checking.
     
  5. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    Ok thanks, I will try and figure it out. I'll update when I have found the solution.
     
  6. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    I remember seeing a post on how to fake this behavior. I'm not sure how effective it was though. What they did was to have pathing blockers along the edge of the "cliff" and then invisible xel'naga towers with a much smaller radius along one side of the cliff (the high ground). This way, units can't move through the cliff and units on one side can see "down".
     
  7. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    Thank you for your reply, but I think I may have found a solution. I just need help getting it into a trigger.

    There is a Unit_FlagArray that you can set it the Data editor called "Use Line of Sight" or "e_unitFlagUseLineOfSight". When checked, your vision is blocked by LOS blockers, when unchecked, you have unobscured vision(aka, 'Flying Vision').

    The other option would be to set a unit's vision height via triggers.

    Either way, I will have to use LOS blockers to get this done. There doesn't seem to be a trigger function that is able to 'hide' a region regardless of if you are near it. It seems to only have the ability to reveal regions.

    Now to the part that I do not know and still need help with.
    What "Actions" within a trigger do you use to set the unit vision height or to disable the 'Use Line Of Sight' flag?

    Thanks,
    Kanoobee
     
  8. Varine

    Varine And as the moon rises, we shall prepare for war

    Ratings:
    +832 / 11 / -1
    This is getting a little more complicated than I'm going to be able to help you with, as I (nor do I think most of us) have had Warcraft installed for a long time. I am not entirely confident that you can change Use Line of Sight at runtime.

    One thing I do remember that might help, under Visibility you should be able to emit a black mask visibility modifier over a region. I don't think it's exactly the same as the Fog of War but it might work, at the very least temporarily.
     
  9. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    I might be confused, but we're in the SC2 editor help forum. I was assuming he wanted help implementing this in SC2? ^^
     
  10. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    Lol, yes, since I am posting in the SC2 forum, I am asking about the SC2 editor. When Varine first mentioned WC3, I thought that maybe they had just made a mistake. But I guess not. Sorry if i confused you somehow Varine, I am talking about SC2
     
  11. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    I have just figured it out.

    I have named a region as 'High Ground'.

    I have surrounded the region with LOS blockers and have used this trigger to gain the desired effect:

    Events
    TriggerAddEventUnitRegion(null, High Ground 1, true)
    Actions
    CatalogFieldValueSet(c_gameCatalogUnit, (UnitGetType((EventUnit()))), VisionHeight, (UnitGetOwner((EventUnit()))), ".5")


    OR the non raw data version

    Events
    Unit - Any Unit Enters High Ground 1
    Actions
    Catalog - Set value of Units (Unit type of (Triggering unit)) VisionHeight for player (Owner of (Triggering unit)) to ".5"

    Then to disable it, make a new trigger and set the event value to 'false' or 'Leaves' and the Actions value to "0" Bam, emulated High Ground.

    What this does is grant increased "Vision Height", which is considered a 'stat' in the data editor for a unit. I used the CatalogFieldValueSet trigger to change it.

    This could also be used to emulate a sort of League of Legends style grass.

    By putting the Vision Height value at .5 it grants vision past LOS blockers AND it allows vision of lvl2 ground(lvl1 cliff), but does NOT allow vision of lvl3 ground(lvl 2 cliff)

    Hope this helps someone else too.

    One thing I will continue to try and figure out is setting a more specific variable for the 'Entry' section of the catalog trigger. The 'entry' part of this catalog trigger is specifically asking for a unit's 'Type', which is a unit's internal name. I'll give an example, General Warfield's Marine unit has an internal name/type of "MarineWarfield". A Unit's internal name can be easily found in the data editor(Detail View) for the unit, under the 'Unit' tab, near the bottom under (Basic)Unit: Name, Warfield's looks like this: "Unit/Name/MarineWarfield".

    But it might actually be that you cannot get more specific since the 'Entry' part of the trigger is specifically demanding the unit's type and the type is shared across all of the same unit. The only work around I can immediately think of is if you made a bunch of duplicates, all with different internal names. But that is not really reasonable for most situations.
     
    Last edited: May 18, 2014
  12. Varine

    Varine And as the moon rises, we shall prepare for war

    Ratings:
    +832 / 11 / -1
    Oh. Well fuck, I tried. I didn't even look, I'm sorry. I see you seemed to have gotten it working to your liking despite that though. Damn it, the fucking one time I try to help.
     
  13. Kanoobee

    Kanoobee New Member

    Ratings:
    +1 / 0 / -0
    No one is mad or bugged with you, man. I appreciated that someone was responding, in the end i was able to figure it out with a lot of Googling(I mean a lot). So no worries man.

    So, something I have found in my journey accross the internet for information about the editor, there does not seem to be a comprehensive source, like a good wiki on it. There are like 5 wikis on the editor but they are all so incomplete.
     

Share This Page