• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Region question.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
Is it possible to make a region a different shape than a square? Or to add more points to it to shape it differently.

I've got bases on my map that aren't 100% squares, I have a base claiming trigger which relies on a region. Do I need to use multiple regions or is this possible^ ?
 
Level 12
Joined
Dec 2, 2016
Messages
733
if it's near a unit you can use the "Unit comes within 500 of "Your Unit" " Event, or maybe use a dummy unit for that, you either need to have it preplaced or in a variable

this get's you a circle form

Nah my problem is I have bases that are right below another base. So I can't have the region cover the entire base without covering another base. Which is why I was wondering if it's possible to change the shape of a region.

Should I use multiple regions?
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
depending on how "weird looking" your region should be you can do that. just keep in mind to maybe add your unit to a unit group or some other backup system so your trigger doesn't fire twice when a unit switches regions while still being in range
 
Level 2
Joined
Apr 11, 2011
Messages
17
Fast remark. There are two different meanings of word "Region". In World Editor's GUI Regions is actually Rects (Rectangles). In Jass - Rects are Rects, Regions are Regions.
So after this, I offer you to use JASS Manual: API Browser - Functions in common.j
There are several functions that solve your problem of custom-made Regions (Rects will always have rectangle form, so don't use them). Mainly "RegionAddRect()"
Even in GUI customly created Region can be manipulated throught the function "Triggering Region" in GUInterface, keep you in touch.
 
Status
Not open for further replies.
Top