Raised This Month: $51 Target: $400
 12% 

[L4D1 & L4D2] Selfie Camera [v1.0.1 | 25-July-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7672
Plugin Version:
1.0.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Turns the camera into selfie mode
    Old 06-06-2021 , 12:20   [L4D1 & L4D2] Selfie Camera [v1.0.1 | 25-July-2021]
    Reply With Quote #1

    Description

    This plugin turns the camera into selfie mode.

    When the character moves, the camera is turned off.

    Based on the L4D2 Workshop Addon Selfie Camera by Sw1ft.

    Features
    • Allow configuring a default distance for the selfie camera.
    • Allow configuring a maximum distance for the selfie camera.
    • Allow clients manually set their camera distance. (through sm_selfie [distance] command)

    Preview



    Cvars

    A configuration file named "l4d_selfie_camera.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Default distance from client when enable the selfie camera.
    // -
    // Default: "50"
    // Minimum: "0.000000"
    l4d_selfie_camera_distance "50"

    // Max distance from client when enable the selfie camera.
    // 0 = Unlimited.
    // -
    // Default: "150"
    // Minimum: "0.000000"
    l4d_selfie_camera_distance_max "150"

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_selfie_camera_enable "1" 
    Public Commands
    • sm_selfie [distance] => Change the camera to the selfie mode.

    Admin Commands
    • sm_print_cvars_l4d_selfie_camera => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • Glows aren't visible while selfie mode is turned on.
    • When the character moves, the camera is turned off.
    • This plugin uses a "point_viewcontrol_survivor" entity to simulate the camera for each client.
    • It may look a bit laggy for high latency clients.
    • Sometimes the camera may attach to a random common when the player dies. (unknown cause)
    • point_viewcontrol makes the player invulnerable while enabled on camera, point_viewcontrol_survivor/point_viewcontrol_multiplayer don't.

    Thank you!

    Related Plugins

    Related Workshop Addons

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d_selfie_camera.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_selfie_camera.sp - 259 views - 12.8 KB)
    __________________

    Last edited by Marttt; 02-25-2024 at 09:10.
    Marttt is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 06-06-2021 , 15:14   Re: [L4D1 & L4D2] Selfie Camera [v1.0.0 | 06-June-2021]
    Reply With Quote #2

    Nice one, Marttt!

    That was the thing I also wanted to implement, but never had a time for that.

    You used "point_viewcontrol" which seems more suitable than my idea with parented dummy entity + SetClientViewEntity.

    All at all, great work!

    ---
    BTW, this is irreplaceable thing for Left 4 Dead 1, where programmatic change player view to 3rd person is impossible.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 06-06-2021 at 15:19.
    Dragokas is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-06-2021 , 15:20   Re: [L4D1 & L4D2] Selfie Camera [v1.0.0 | 06-June-2021]
    Reply With Quote #3

    Yeah great demonstration of point_viewcontrol, so simple but effective. Something I only tested out in private plugins which introduced motion sickness haha. Good job, thanks for sharing!
    __________________
    Silvers is offline
    th3y
    Junior Member
    Join Date: Jan 2014
    Old 06-07-2021 , 15:25   Re: [L4D1 & L4D2] Selfie Camera [v1.0.0 | 06-June-2021]
    Reply With Quote #4

    Just as extra information, view control entity has no bridge with glows. I tried this method before, but its only for simple things.
    __________________
    th3y is offline
    RobertHWhitlock
    New Member
    Join Date: Oct 2021
    Old 10-08-2021 , 06:56   Re: [L4D1 & L4D2] Selfie Camera [v1.0.0 | 06-June-2021]
    Reply With Quote #5

    Hello, thanks for the information.
    RobertHWhitlock is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 19:39.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode