• 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.

Buff Granted by Proximity to Water

Status
Not open for further replies.
Level 12
Joined
Dec 13, 2008
Messages
1,049
Hello everyone. So, I have a question:
I would like to make a mechanic for the Naga race in my map. To prevent them being OP, I am making their units weaker than regular. However, I would like it so that if they are within...lets say...500 yards of water of some kind (deep or shallow, like a lake, river, or ocean) of water, then they will gain some buffs (such as armor, attack, movement speed, etc)
However, I do not know how to make a trigger like this. Also, I do not want it to occur if they are by water that is covered by a boundary (unless they are already in water) because I have several ''dungeon'' type places that are surrounded by water covered in a boundary.
If you have any questions, let me know. Thank you very much!!
 
Level 12
Joined
Dec 13, 2008
Messages
1,049
So maybe....while in a certain region, the specified player (since this only works for player Teal when he/she chooses Naga) receives the buffs? And the regions would be placed to only include the water not modified by boundaries?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
A region is a collection of cells and rects. Probably it compiles to whatever a cell is in actual game mechanics.

A rect is a rectangular area of the playfield. Rects are stupidly called "Regions" in GUI but a true region type object is described above.

The unit enters region event takes a region. The GUI interface to it uses a rect which then internally gets added to a locally created region so the event is bound to a region comprising of the specified rect. Using JASS though you can specify a region that contains many rects inside it.

Confusing? Well I agree... It was prety poor design work of blizzard to call rects regions in GUI.

In Starcraft II, the mechanics were changed to be far more simple. They made it so that a region is nothing more than a collection of circles and squares representing area on the playfield and even added support for negative areas (so you could have a square region with a circle cut out of it for example). Too bad WC3 is not SC2 though.
 
Level 12
Joined
Dec 13, 2008
Messages
1,049
That is really confusing......
So...basically...make a trigger for every region that a unit would enter that would receive the buff?

So, if there are 25 regions that cover any area with water, then make 25 triggers that basically say ''unit enters region, unit owned by Teal, give 'buff' to entering unit.''?
 
Status
Not open for further replies.
Top