• 🏆 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!

Face Angle Request

Status
Not open for further replies.
Level 3
Joined
Feb 21, 2009
Messages
41
I am currently working on an RP map. On the map is a command called 'fa. Type in 'fa 10, then 'fa 100 and it will rotate the building to what should be 90 degrees. From what I've gathered through constant messing around with the trigger, it has to be done with Jass if it is to work right. As hinted by the fact 'fa 100 = 90 degrees, the trigger version I am using now doesn't work as intended.

What I need is a code I can put in the map that will make it so if I type 'fa 90, the structure or unit will rotate 90 degrees. If I type in 'fa 124, it will rotate 124 degrees.

I will be honest: I know next to nothing about Jass.


How do I know this can be done? Because its already been done on several maps. SotDRP1.04, SotDRP Yag-Sinekas, and NGoRP Ashenvale, all of which can be found on MMH. On any of those maps, the rotation system works perfectly.

So ya, if anyone could help me out with this, that would be awesome. Thanks.
 
Level 3
Joined
Feb 21, 2009
Messages
41
Ill give it a shot. The map has a GUI trigger for it now, but it doesnt work right. The angles arent right. Hopefully yours works better than mine.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
well something simple like this should work

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -fa 90 as An exact match
    • Conditions
    • Actions
      • Set Current_angle = ((Facing of Your_building) + 90.00)
      • Set temp_loc = (Position of Your_building)
      • Unit - Remove Your_building from the game
      • Unit - Create 1 (Unit-type of Your_building) for (Triggering player) at temp_loc facing Current_angle degrees
      • Custom script: remove location bla bla
 
Status
Not open for further replies.
Top