Raised This Month: $134 Target: $400
 33% 

[TF2] Stickybomb and Pipe Indicator v1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Author
nergal
Veteran Member
Join Date: Apr 2012
Plugin ID:
4986
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 01-05-2016 , 20:57   [TF2] Stickybomb and Pipe Indicator v1.2
    Reply With Quote #1

    This plugin creates a Call of Duty-esque projectile indicator for Stickybombs and Pipe Grenades!

    since this plugin uses the new Syntax, it requires SourceMod 1.7+ to compile;
    also, this plugin can also be modified to work in order games as so needed.

    cvars
    PHP Code:
    projindic_enabled "1" Enable Projectile Indicator plugin
    projindic_grenades 
    "1" Enable the Projectile Indicator plugin to detect pipe grenades
    projindic_stickies 
    "1" Enable the Projectile Indicator plugin to detect stickybombs

    projindic_grenaderadius 
    "300.0" Detection radius for pipe grenades in Hammer Units
    projindic_stickyradius 
    "300.0" Detection radius for stickybombs in Hammer Units
    projindic_detectfriendly 
    "1" Detect friendly projectiles 
    Commands
    PHP Code:
    User sm_detect or sm_indic Enables the indicator
    Admins 
    sm_forcedetection or sm_forcedetect <@all|@red|@blue|@alive|@etc.> 



    BitBucket Repo -> CLICK-ME11!

    ;

    Demonstration Video -> http://www.youtube.com/watch?v=HCbeaGlqAhQ
    Attached Files
    File Type: sp Get Plugin or Get Source (projdetector.sp - 78 views - 10.5 KB)
    __________________

    Last edited by nergal; 10-04-2016 at 13:03.
    nergal is offline
    nergal
    Veteran Member
    Join Date: Apr 2012
    Old 01-09-2016 , 00:50   Re: [TF2] Stickybomb and Pipe Indicator v1.1
    Reply With Quote #2

    Version 1.1 changes

    edited the code to be more optimized. Prevented plugin-crashes by using sans-Handle HUD messages

    Switched the code to PostThinkPost for faster, accurate updating of the HUD placement.
    __________________
    nergal is offline
    404UserNotFound
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Location: 🍁
    Old 01-23-2016 , 06:20   Re: [TF2] Stickybomb and Pipe Indicator v1.1
    Reply With Quote #3

    Got pictures of this in action?

    Also what's with the commented-out "Speed Mod" code, and this comment:

    Quote:
    //forces players to become the tank class regardless of team cvars
    I think you've got some code from your other projects mixed in here
    __________________
    I'm not a SourcePawn expert, I just play one on TV.
    Want to join the SourceMod Discord server? Click here!


    Last edited by 404UserNotFound; 01-23-2016 at 06:22.
    404UserNotFound is offline
    nergal
    Veteran Member
    Join Date: Apr 2012
    Old 01-23-2016 , 12:53   Re: [TF2] Stickybomb and Pipe Indicator v1.1
    Reply With Quote #4

    Quote:
    Originally Posted by abrandnewday View Post
    Got pictures of this in action?

    Also what's with the commented-out "Speed Mod" code, and this comment:



    I think you've got some code from your other projects mixed in here
    To speed up my development, I pretty much have a template.sp which includes a bunch of code from my other projects that I changed to be more inclusive to the code.

    Pics? No pics yet because I didn't think to add them lol

    Also, I added a demonstration VIDEO, better than pics
    __________________

    Last edited by nergal; 01-23-2016 at 13:33.
    nergal is offline
    nergal
    Veteran Member
    Join Date: Apr 2012
    Old 10-04-2016 , 02:04   Re: [TF2] Stickybomb and Pipe Indicator v1.2
    Reply With Quote #5

    update v1.2

    Removed methodmaps in favor of just using simple arrays.

    There's two reasons why I did this...

    1. It's faster and simpler that I used an array instead of syntactically sugared functions that simply returned the value of the array.
    2. methodmaps no longer allow me to return arbitrary size arrays from functions.
    __________________
    nergal is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 10-04-2016 , 20:12   Re: [TF2] Stickybomb and Pipe Indicator v1.2
    Reply With Quote #6

    Out of curiosity, where does the math for delta vec -> screenspace come from?
    Also, why do GetDeltaVector and GetDistFromProj use different methods of getting client abs origin?

    If you create separate SyncHuds for each projectile and pass those into DrawIndicator, you could get sharper tracking (killing or repurposing each SyncHud as its projectile dies).

    Lastly, I believe the annotation feature of TF2 (as in https://forums.alliedmods.net/showthread.php?p=1317304 ) can do most of this already, including screenspace indicators and in-world blips, though you can't modify the size it takes up on the screen (for the in-world ones).
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    nergal
    Veteran Member
    Join Date: Apr 2012
    Old 10-04-2016 , 20:21   Re: [TF2] Stickybomb and Pipe Indicator v1.2
    Reply With Quote #7

    Quote:
    Originally Posted by FlaminSarge View Post
    Out of curiosity, where does the math for delta vec -> screenspace come from?
    Also, why do GetDeltaVector and GetDistFromProj use different methods of getting client abs origin?

    If you create separate SyncHuds for each projectile and pass those into DrawIndicator, you could get sharper tracking (killing or repurposing each SyncHud as its projectile dies).

    Lastly, I believe the annotation feature of TF2 (as in https://forums.alliedmods.net/showthread.php?p=1317304 ) can do most of this already, including screenspace indicators and in-world blips, though you can't modify the size it takes up on the screen (for the in-world ones).
    it comes from Valve's C++ code for detecting the Health Plus sign when you're a medic and someone calls for a medic.

    @props Code by Valve from their Source Engine hud_damageindicator.cpp. The problem is that some of the code is actually unused so I commented that out.

    reason for different methods of getting player abs origin is through sheer oversight

    The reason I didn't use annotations is that annotations are bulky in the screen and too much of them is ultimately annoying, Secondly, I thought it was more better for my experience to do it from scratch and it came out exactly as hoped!
    __________________

    Last edited by nergal; 10-04-2016 at 20:21.
    nergal is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 02-08-2017 , 14:59   Re: [TF2] Stickybomb and Pipe Indicator v1.2
    Reply With Quote #8

    Maybe what's being done here could be adapted in some way too ;p

    https://forums.alliedmods.net/showth...=293700&page=2


    I've tried annotations. They'll stick to the left and right of your screen, instead of appearing in a directional circle.

    +1 for SyncHudText.
    __________________

    Last edited by Chdata; 02-08-2017 at 15:00.
    Chdata is offline
    Reply


    Thread Tools
    Display Modes

    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 00:30.


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