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

Setting unit's rotation on the z axis

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
In the Object Editor (F6), you got 2 parts called 'Maximum Pitch Angle (degrees)' and 'Maximum Roll Angle (degrees)'. They can flip your unit. Hold shift (to allow negative numbers) and double-click 1 of those. Then set the number to -90 to flip him 90 degrees. Positive numbers don't work if you want to force a unit to always walk in a certain angle. If you enter a positive number, that will be the max angle he can walk when walking up a hill.

I'm not sure if you can change this by trigger.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Well it is a Trigger & Scripts question now you mentioned that you need it for JASS. Before that it was a World Editor question xD

But back to the topic: I don't know any JASS, so you'll have to ask Rui to move this back or delete this and make a new thread in the Triggers & Scripts Section where you specifically mention you need to change it in JASS.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
No, there isn't such a function in Jass.

P.s. And you got it wrong. Rotating a unit around the Z axis is setting it's facing.
Note what the Z axis is in wc3:
xyz_axes.gif

And no, you can't rotate something in an axis, you can do so in a plane(i.e. in the plane defined by X axis and Z axis) or around an axis.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
That is clear enough :)
And my answer is still no. There is no function that does this.
But maybe PurplePoot's suggestion could work, i guess.
 
Level 6
Joined
Mar 15, 2005
Messages
112
Heres my idea but it doesn't work. Maybe this could be made to work? Can make bones face different Z offsets. The head & chest works though! Well the chest worked until I converted it into custom text. Then I looked up the bone names in a model editor. EDIT: These bones are from the footman.

function Trig_left_Actions takes nothing returns nothing
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_head", gg_unit_hfoo_0000, 0, 0, 180.00 )
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_chest", gg_unit_hfoo_0000, 0, 0, 180.00 )
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_leg1_L", gg_unit_hfoo_0000, 0, 0, 180.00 )
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_leg1_R", gg_unit_hfoo_0000, 0, 0, 180.00 )
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_Pelvis", gg_unit_hfoo_0000, 0, 0, 180.00 )
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_arm1_L", gg_unit_hfoo_0000, 0, 0, 180.00 )
call SetUnitLookAt( gg_unit_hfoo_0000, "bone_arm1_R", gg_unit_hfoo_0000, 0, 0, 180.00 )
endfunction

//===========================================================================
function InitTrig_Trigger takes nothing returns nothing
set gg_trg_Trigger = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Trigger, 0.10 )
call TriggerAddAction( gg_trg_Trigger, function Trig_left_Actions )
endfunction
 
Status
Not open for further replies.
Top