Talk:SetAngle - ObjectReference: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Rasikko
m (→‎Force an interior compass to point north.: Removed unnecessary variable.)
m (Convert source tags to syntaxhighlight)
 
Line 30: Line 30:
== Force an interior compass to point north. ==
== Force an interior compass to point north. ==
This was a little experiment I tried out. Just turn the north marker so that it faces north. Since the compass is based on the north marker.. if you enter a cell with a north marker pointing east, the compass will think you are entering from the east.
This was a little experiment I tried out. Just turn the north marker so that it faces north. Since the compass is based on the north marker.. if you enter a cell with a north marker pointing east, the compass will think you are entering from the east.
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function SetNorthMarkerToPointNorth() Global
Function SetNorthMarkerToPointNorth() Global
; Sets the North Marker in a cell to point north.
; Sets the North Marker in a cell to point north.
Line 54: Line 54:
endif
endif
EndFunction
EndFunction
</source>
</syntaxhighlight>
Only thing is, the compass wont reset until you exit and re-enter the cell. If one were to seriously use this though, they'll need to store the marker and the marker's original z rotation prior to the change so that you can revert the changes for whatever reason. I'm thinking if it were possible to call [[GetParentCell - ObjectReference]] on objects in exterior cells, it would be possible to match the inside compass to that of the inside one. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2018-01-06T13:40:48 (EST)
Only thing is, the compass wont reset until you exit and re-enter the cell. If one were to seriously use this though, they'll need to store the marker and the marker's original z rotation prior to the change so that you can revert the changes for whatever reason. I'm thinking if it were possible to call [[GetParentCell - ObjectReference]] on objects in exterior cells, it would be possible to match the inside compass to that of the inside one. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2018-01-06T13:40:48 (EST)

Navigation menu