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

Terrain question

Status
Not open for further replies.
Level 4
Joined
May 27, 2012
Messages
85
Can I add to a terrain an ability? like if i use snow terrain, and i want it to be realistic so the units will move X% slower while walking in the snow.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Yes, you can do this in various ways.
For example there is a condition which checks for terrain type at a special point. If the terrain type at a unit is the snow one you could add a slow ability to the unit.

Or if your terrain doesnt change it might be easier to just place some invisible dummy units across the snow terrain wich give a slow aura.
 
Level 4
Joined
May 27, 2012
Messages
85
the problem with dummy is that the aura can get outside the place with the snow...
And i didn't really understood how to make the first way
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
If you use the dummy aura solution you might have to make more than one aura with different ranges so they cover your snow terrain. The advantage is you dont need any trigger.

If you have very small scattered areas of snow terrain use the terrain condition method, something like the example in the attachment. Note that the slow aura there is meant to have targets 'self' only.

A third method would be to use Unit enters region/Unit leaves region events to add and remove the self slow aura. Though this would require a lot of regions I guess.
 

Attachments

  • slowExample.jpg
    slowExample.jpg
    35.5 KB · Views: 89
Level 4
Joined
May 27, 2012
Messages
85
its about 1/4 of the map and the map is pretty big. and if you look at the map the snowy place is like a triangle. what would be the easier way? : /
 
Level 9
Joined
Jul 10, 2011
Messages
562
make a periodic trigger (every 0.1 seconds i would recommend) and pick every unit in a unit group (i would recommend that you add some restriction in the group so that not every unit is picked....could cause lagg), set the position of the unit in a variable and check whether at the position is snow and if so make him slower (if you use a hashtable it would be doable without an ability).
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
A triangle, hm? A circle or rectangle would be so easy : P..

The way which is the least work for you is for sure the one shown in the previous attachement. If you dont have a massive amount of units use that one.

If you have a massive amount of units I suggest you use the dummy units with the aura and place them for most efficiency like in the new (ugly) attachement.
 

Attachments

  • dummyUnitsExample.jpg
    dummyUnitsExample.jpg
    21.3 KB · Views: 73
Status
Not open for further replies.
Top