openclonk/docs/sdk/script/fn/SetViewOffset.xml

39 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>SetViewOffset</title>
<category>Player</category>
<subcat>View</subcat>
<version>5.1 OC</version>
<syntax>
<rtype>bool</rtype>
<params>
<param>
<type>int</type>
<name>player</name>
<desc>Player whose view offset you want to change.</desc>
</param>
<param>
<type>int</type>
<name>x</name>
<desc>X offset value in pixels.</desc>
</param>
<param>
<type>int</type>
<name>x</name>
<desc>Y offset value in pixels.</desc>
</param>
</params>
</syntax>
<desc>Moves the view of a player permanently by a given offset. Calling the function again will set a new offset. Calling the function with 0,0 parameters will reset to normal, centered view.
Returns false if the given player is invalid and true otherwise.</desc>
<related>
<funclink>SetPlrView</funclink>
<funclink>ShakeViewport</funclink>
</related>
</func>
</funcs>