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

Rotation Help!!!

Status
Not open for further replies.
Level 11
Joined
Dec 31, 2007
Messages
780
well... buildings cant be rotate once they are placed... what you can do.. is a trigger to create that building in a certain location and make it face the direction you need (it is in the same trigger that triggers the creation)

also... you may set that building as a unit (in the unit properties) then.. place the unit in the location you want and make it face the point you want with this "/" "*" ... after this... go back to unit properties and set the unit back to building...

hope this helps ^^
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
Code:
function Trig_Rotation_Conditions takes nothing returns boolean
    if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_STRUCTURE) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Rotation_Actions takes nothing returns nothing
    call SetUnitPositionLocFacingBJ( GetTriggerUnit(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
endfunction

//===========================================================================
function InitTrig_Rotation takes nothing returns nothing
    set gg_trg_Rotation = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Rotation, 1.00 )
    call TriggerAddCondition( gg_trg_Rotation, Condition( function Trig_Rotation_Conditions ) )
    call TriggerAddAction( gg_trg_Rotation, function Trig_Rotation_Actions )
endfunction

Edit it to your liking.
 
Level 2
Joined
Aug 15, 2006
Messages
21
Well since you dont know Jass isnt there a trigger such as
Code:
Event-
A unit finishes building
Condition-
Finished building (BuildingInRegion) = True
Action-
Set unit facing point X,Y

something like that. sorry dont have my Editor open atm. For sure this leaks, but theres annother custom Script that fixes it, cant remember it though =/
 
Level 2
Joined
Aug 15, 2006
Messages
21
That is called GUI. And yes i know how that works. I just didn't think about it clearly about that kind of rotation lol. Either way ty for your helping attempt.

haha there we go =] Sorry its been a while and i can hardly remember some jass myself
 
Level 11
Joined
Dec 31, 2007
Messages
780
also... you may set that building as a unit (in the unit properties) then.. place the unit in the location you want and make it face the point you want with this "/" "*" ... after this... go back to unit properties and set the unit back to building...

i dont know if he understood my explanation :p
 
Status
Not open for further replies.
Top