AR/fadeCamera: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 32: | Line 32: | ||
==See Also== | ==See Also== | ||
{{ | {{AR/Camera_functions}} |
Revision as of 18:34, 25 July 2015
وهذه وظيفة تتلاشى كاميرا اللاعب إلى لون أو العودة إلى وضعها الطبيعي خلال فترة زمنية محددة . وهذا يؤثر أيضا على حجم الصوت ل اعب ( 50 ٪ تلاشت = حجم 50 ٪ ، تتلاشى كامل = أي صوت) . للمخطوطات clientside يمكنك تنفيذ 2 الإضافية تتلاشى أو تتلاشى الرافضة في صف واحد، ولكن للمخطوطات جانب الخادم يجب استخدام واحد ثم من جهة أخرى .
Syntax
Click to collapse [-]
Serverbool fadeCamera ( player thePlayer, bool fadeIn, [ float timeToFade = 1.0, int red = 0, int green = 0, int blue = 0 ] )
Example
<section name="Server example" class="server" show="true"> When a player gets damaged, place a quick fade-to-red effect on his screen.
function addRednessOnDamage ( ) fadeCamera ( source, false, 1.0, 255, 0, 0 ) -- fade the player's camera to red over a period of 1 second setTimer ( fadeCameraDelayed, 500, 1, source ) -- don't let it go to opaque red, interrupt it after half a second and fade back to normal end addEventHandler ( "onPlayerDamage", getRootElement(), addRednessOnDamage ) function fadeCameraDelayed(player) -- This function prevents debug warnings when the player disconnects while the timer is running. if (isElement(player)) then fadeCamera(player, true, 0.5) end end
See Also
- fadeCamera
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraInterior
- getCameraMatrix
- getCameraShakeLevel
- getCameraTarget
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraInterior
- setCameraMatrix
- setCameraShakeLevel
- setCameraTarget
- setCameraViewMode