Warcraft III resources & community, 2003–2006 · archived

different moveing speed on different terrain

2 posts
#1

different moveing speed on different terrain

is it possible to change moving speed on certain kind of terrain ?? e.g. in the town +20% / on road +10% / plains - fields +2% / snow -10% / swamps -15% / cursed land -20% ??

and without doing specific regions for that, coz that is impossible while working on bigger map ;/
#2

Re: different moveing speed on different terrain

Mesiashis it possible to change moving speed on certain kind of terrain ?? e.g. in the town +20% / on road +10% / plains - fields +2% / snow -10% / swamps -15% / cursed land -20% ??

and without doing specific regions for that, coz that is impossible while working on bigger map ;/


i will write this out in psuedo:


event, periodic, every second or so
actions,
    set point Z = position of Hero
    set terraintype Y = terrain type at point Z
    if terraintype is blah blah
        set movement speed of Hero = blah blah
    endif
    etc...
    destroy Z



now, the problem with this so far is that obviously you can't use a direct modifier since it would accumulate over time, the alternative is the save the Hero's base speed into a variable and modify that, since i don't think base speed of unit takes into account items or like poisoned/chilled it might be hard to make those apply and get modified
now, alternatively, it may be possible to give the unit 'speed modifying' abilities that don't show up as they enter new terrain types, and take them away as they come off of them

thats the best i can come up with