• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

How do i rotate a unit that needs to be built.

Status
Not open for further replies.

MU2

MU2

Level 3
Joined
Oct 13, 2009
Messages
24
Im currently creating a map and have customised a worker to build walls. But the problem is that the wall can only face one direction. Is there a way that i can configure the worker to be able to rotate the wall before it is placed to be built? If that cannot be done how can i rotate the wall unit alone so that workers can place vertical and horizontal walls?
 

MU2

MU2

Level 3
Joined
Oct 13, 2009
Messages
24
yes but rotating the unit is the problem. Other doodads can be rotated by editing the fixed rotation sector in the object editor. But since the wall is a unit there is no fixed rotation sector for it in the object editor and hence i cannot rotate it and add abilities to build other angles of the wall.So is there a way i can rotate the wall unit in the object editor and save it at another angle?
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
I have a nice solution if your wall has only 4 angles

1.)

you can make ability on wall that will rotate the wall

one for rotate left and another one for rotate right

(use abilities like wind wind walk that do not have any delay and set duration to 0.01

2.)

KEY FOR WALLS "W"

you would need 2 walls for this

when player presses left arrow while he has your unit selected

one horizontal "-" (WALL 1)and one vertical "I" (WALL 2)

when player wants to build a wall first one will be wall 1

now if player presses ESC
make array condition Variable called ESC

-disable training of WALL 1 for player
-enable training of WALL 2 for player

game-force player to press "B" (key for build structure)
game-force player to press "W" (key for another wall)

set ESC (number of player) = true

and when ESC is true than you do the opposite

but i think you should use the first way.....
 
  • Like
Reactions: MU2
Level 10
Joined
Sep 21, 2007
Messages
517
yea u can change it ingame man, and u can preset it in object editor, but yea man it can be changed through triggers, make unit face w/e degrees. when unit starts building something, change it to w/e degrees. il pastebin an example for you if needed, tho working on an assignment now.
 
  • Like
Reactions: MU2

MU2

MU2

Level 3
Joined
Oct 13, 2009
Messages
24
Ok i customised the wind walk abilty. Set its cool down to 0 and changed icon etc. Now how exactly do i create the effect so that it will trigger the wall to rotate when i click it. Im sorry bt this is my first map and im very noob at map making so help me please
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
i think you could move his face point instantly

or maybe just

-kill casting unit
-create 1 unit of type casting unit facing (degrees of casting unit + 90) at position of casting unit
-remove casting unit for owner of unit (casting unit)
-select last created unit for owner of last created unit
 
Status
Not open for further replies.
Top