AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Stickybomb and Pipe Indicator v1.2 (https://forums.alliedmods.net/showthread.php?t=277269)

nergal 01-05-2016 19:57

[TF2] Stickybomb and Pipe Indicator v1.2
 
1 Attachment(s)
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

nergal 01-08-2016 23:50

Re: [TF2] Stickybomb and Pipe Indicator v1.1
 
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.

404UserNotFound 01-23-2016 05:20

Re: [TF2] Stickybomb and Pipe Indicator v1.1
 
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 :P

nergal 01-23-2016 11:53

Re: [TF2] Stickybomb and Pipe Indicator v1.1
 
Quote:

Originally Posted by abrandnewday (Post 2385694)
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 :P

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 :3

nergal 10-04-2016 01:04

Re: [TF2] Stickybomb and Pipe Indicator v1.2
 
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.

FlaminSarge 10-04-2016 19:12

Re: [TF2] Stickybomb and Pipe Indicator v1.2
 
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).

nergal 10-04-2016 19:21

Re: [TF2] Stickybomb and Pipe Indicator v1.2
 
Quote:

Originally Posted by FlaminSarge (Post 2459254)
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!

Chdata 02-08-2017 13:59

Re: [TF2] Stickybomb and Pipe Indicator v1.2
 
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.


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

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