Raised This Month: $248 Target: $400
 62% 

[ANY] Showtriggers


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ici
Member
Join Date: Jan 2014
Plugin ID:
5407
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    148 
    Plugin Description:
    Make trigger brushes visible.
    Old 11-11-2016 , 19:17   [ANY] Showtriggers
    Reply With Quote #1

    This plugin replicates the showtriggers_toggle console command without the need of sv_cheats. If you're not familiar with what it does, it basically loops through all trigger entities on the map and toggles their visibility.

    There is only one command and it is sm_showtriggers
    Here is a demo of how it looks like:



    I have only tested it on CS:S but on theory it should work for any game.

    Thanks to:
    • unt0uch4bl3 for the idea itself as I've personally seen this in action first on KSF Surf.
    • Pan32 for introducing me to the idea and inspiring me to make this plugin.

    Feel free to alter the source code to your needs. I am not sure if I'll be taking feature requests at this point in time.

    Quote:
    Changelog:

    v1.1 14-11-16
    - Got rid of compiler warnings / deprecated functions and translated the script to the new syntax. Thanks to Pan32.

    v1.0 12-11-16
    - Initial release.
    Attached Files
    File Type: sp Get Plugin or Get Source (showtriggers.sp - 4133 views - 3.9 KB)

    Last edited by ici; 11-14-2016 at 15:47. Reason: Updated the plugin
    ici is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 11-11-2016 , 22:02   Re: [ANY] Showtriggers
    Reply With Quote #2

    Nice idea! I've found myself wanting to display triggers in a live server before, but not possible due to the sv_cheats requirement.

    A couple compilation warnings:

    Code:
    // G:\sourcemod 1.8\scripting\showtriggers.sp(32) : warning 234: symbol "FindSendPropOffs" is marked as deprecated: Use FindSendPropInfo instead, or HasEntProp if you just want to check for existence.
    //
    //
    // G:\sourcemod 1.8\scripting\showtriggers.sp(37) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
    Compiled against SM 1.8.

    Tested, works well with CS:GO!
    __________________

    Last edited by sneaK; 11-11-2016 at 22:14.
    sneaK is offline
    _GamerX
    AlliedModders Donor
    Join Date: Jun 2011
    Location: Fun Server
    Old 11-12-2016 , 08:49   Re: [ANY] Showtriggers
    Reply With Quote #3

    Why make it so complicated? Just use Map Viewer...
    _GamerX is offline
    Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
    AI_
    Member
    Join Date: Oct 2014
    Location: Canada
    Old 11-12-2016 , 09:14   Re: [ANY] Showtriggers
    Reply With Quote #4

    This is interesting, and could be useful on TF2 jump servers too.

    But I can't get it to work there even after recompiling with 1.8. Any ideas?
    __________________
    AI_ is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 11-12-2016 , 11:36   Re: [ANY] Showtriggers
    Reply With Quote #5

    Quote:
    Originally Posted by _GamerX View Post
    Why make it so complicated? Just use Map Viewer...
    Because this is a helpful tool for when you're in-game and want to see triggers, for example while zoning maps on a surf server.

    Just because it's not useful for you doesn't mean it's useless for everyone.
    __________________
    sneaK is offline
    ici
    Member
    Join Date: Jan 2014
    Old 11-12-2016 , 12:17   Re: [ANY] Showtriggers
    Reply With Quote #6

    Quote:
    Originally Posted by AI_ View Post
    This is interesting, and could be useful on TF2 jump servers too.

    But I can't get it to work there even after recompiling with 1.8. Any ideas?
    Hey, I tested it and it works for me. I'm using the latest stable MM and SM builds. Here's a screenshot: https://hostr.co/file/bP1WgM1J6ysT/20161112170150_1.jpg

    If you could give me some more details, I might be able to investigate the issue further and help you.

    Quote:
    Originally Posted by blackhawk74 View Post
    Nice idea! I've found myself wanting to display triggers in a live server before, but not possible due to the sv_cheats requirement.

    A couple compilation warnings:

    Code:
    // G:\sourcemod 1.8\scripting\showtriggers.sp(32) : warning 234: symbol "FindSendPropOffs" is marked as deprecated: Use FindSendPropInfo instead, or HasEntProp if you just want to check for existence.
    //
    //
    // G:\sourcemod 1.8\scripting\showtriggers.sp(37) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
    Compiled against SM 1.8.

    Tested, works well with CS:GO!
    Thanks for the feedback I will get rid of the warnings and update the OP with the modified version of the script. I'll mostly likely do that after AI_'s TF2 issue is resolved (just in case there's anything I'd have to modify again).
    ici is offline
    Snaggle
    AlliedModders Donor
    Join Date: Jul 2010
    Location: England
    Old 11-12-2016 , 12:38   Re: [ANY] Showtriggers
    Reply With Quote #7

    Good stuff, I can see a lot of uses for this when testing maps. Thank you.
    Snaggle is offline
    AI_
    Member
    Join Date: Oct 2014
    Location: Canada
    Old 11-15-2016 , 02:58   Re: [ANY] Showtriggers
    Reply With Quote #8

    I got it to work after a reboot. Thanks for the plugin!

    I'll share this with the rest of the jump community.
    __________________
    AI_ is offline
    Pan32
    Member
    Join Date: Dec 2010
    Location: ?
    Old 11-15-2016 , 15:41   Re: [ANY] Showtriggers
    Reply With Quote #9

    Made a quick edit, so instead of going through the entity classname, it goes by its netclass (CBaseTrigger). This will allow some other triggers like func_buyzone, func_bomb_target and others to also show up, however it will only work on games in which the triggers have that base netclass, like csgo (css, ie, considers all triggers a CBaseEntity).

    EDIT: Fixed the buffer
    Attached Files
    File Type: sp Get Plugin or Get Source (showtriggers.sp - 1042 views - 3.9 KB)

    Last edited by Pan32; 11-15-2016 at 17:18.
    Pan32 is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 11-16-2016 , 02:41   Re: [ANY] Showtriggers
    Reply With Quote #10

    On TF2, I've noticed that all triggers are CBaseEntity, but they all have a certain set of datamap properties (m_hTouchingEntities, m_hFilter, m_iFilterName). It's possible you could use a datamap lookup to filter triggers (using Prop_Data).
    __________________
    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
    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 04:01.


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