SC2Mapster Forums

Development > Data

(Solved) Make pylons unbuildable inside power fields

  • 3 posts
    #1 Nov 17, 2012 at 01:21 UTC - 0 likes

    I'm trying to make it so players may not place pylons inside of their existing power fields. I'm hoping to get this to work similarly to how protoss cannot place buildings on creep. I have been digging around in Power Source and Power User behaviors for a few hours and I haven't made any progress. Perhaps I should just make pylons unbuildable within x radius of another pylon, but I wouldn't know how to go about this either. I would prefer to do this without triggers.

    Any help is greatly appreciated! Thanks.

    Edit: I've created a validator which I believe will tell me if a location is unpowered. Is there a way to use this validator to decide if a pylon's placement will be valid? (Not in an existing powerfield)

    Last edited Nov 17, 2012 by KawKawKaw
    #2 Nov 17, 2012 at 18:53 UTC - 0 likes

    You nearly figured it out on your own congratulations.

    The Ability - Info - Validators field of the Build ability is the last part of the puzzle.

    It is used ingame by refineries/assimilators/extractors so that they cannot be built on depleted vespene geysers.

    Last edited Nov 17, 2012 by DrSuperEvil
    #3 Nov 17, 2012 at 20:06 UTC - 0 likes

    @DrSuperEvil: Go

    Thank you, it works perfectly. I can't believe how close I was lol.

  • 3 posts

You must login to post a comment. Don't have an account? Register to get one!