AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Medic's Anti-Projectile Shield v1.1 (Updater Support!) (https://forums.alliedmods.net/showthread.php?t=240456)

404UserNotFound 05-15-2014 19:23

[TF2] Medic's Anti-Projectile Shield v1.1 (Updater Support!)
 
2 Attachment(s)
Use this version from now on, it's actually maintained!

Mitchell 05-16-2014 01:42

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
add more fire.

also you should add cvars so we dont have to re-compile the plugin.

404UserNotFound 05-16-2014 02:07

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
Quote:

Originally Posted by Mitchell (Post 2138404)
add more fire.

also you should add cvars so we dont have to re-compile the plugin.

Fire? Whaddya mean? Also,

Quote:

also you should add cvars so we dont have to re-compile the plugin.
http://i.imgur.com/3UO0YQ0.png
Quote:

To Do
  • Add a convar so you can change how long the wait time is between spawning shields.


rswallen 05-16-2014 02:31

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
Quote:

Originally Posted by abrandnewday (Post 2138254)
If you die during the shield's 10 second lifetime, if the server has any amount of respawn time, you can control the shield while waiting to respawn and it will continue to damage any who touch it until its 10 second lifetime is up. I'm too dumb to figure out how to target an entity spawned by a specific player and kill it without killing every other instance of that entity. halp me plz

Cache the entity reference of the shield when you create it.
When the player dies, check if its still a valid entity, and kill it if it is

PHP Code:

new g_entCurrentShield[MAXPLAYERS+1] = { INVALID_ENT_REFERENCE, ... }

EventHook_OnPlayerDeath(Handle:event, const String:name[], bool:dontbroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (
client != 0)
    {
        if (
IsValidEntity(g_entCurrentShield[client]))
        {
            
AcceptEntityInput(g_entCurrentShield[client], "Kill");
            
g_entCurrentShield[client] = INVALID_ENT_REFERENCE;
        }
    }
}

//[OnShieldCreated]
{
    new 
shield CreateEntityByName("entity_medigun_shield");
    if(
shield != -1)
    {
        
g_entCurrentShield[client] = EntIndexToEntRef(shield);
        
// do other stuff
    
}



404UserNotFound 05-16-2014 02:43

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
Quote:

Originally Posted by rswallen (Post 2138411)
Cache the entity reference of the shield when you create it.
When the player dies, check if its still a valid entity, and kill it if it is

PHP Code:

new g_entCurrentShield[MAXPLAYERS+1] = { INVALID_ENT_REFERENCE, ... }

EventHook_OnPlayerDeath(Handle:event, const String:name[], bool:dontbroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid));
    if ((client != 0) && IsClientInGame(client))
    {
        if (IsValidEntity(g_entCurrentShield[client]))
        {
            AcceptEntityInput(g_entCurrentShield[client], "
Kill");
            g_entCurrentShield[client] = INVALID_ENT_REFERENCE;
        }
    }
}

-[OnShieldCreated]-
{
    new shield = CreateEntityByName("
entity_medigun_shield");
    if(shield != -1)
    {
        g_entCurrentShield[client] = EntIndexToEntRef(shield);
        // do other stuff
    }



I'd give you a blowjob if that was socially acceptable behaviour and not gay in the slightest.

rswallen 05-16-2014 03:21

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
First priority should deffo be restricting the shield based on the active weapon
It seems that holding the ubersaw while damaging someone with the shield has...unforeseen cosequences...

404UserNotFound 05-16-2014 03:33

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
Quote:

Originally Posted by rswallen (Post 2138431)
First priority should deffo be restricting the shield based on the active weapon
It seems that holding the ubersaw while damaging someone with the shield has...unforeseen cosequences...

O_O Like what.....

rswallen 05-16-2014 03:39

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
As you know, the ubersaw grants 25% ubercharge whenever it deals damage.
This behaviour seems to be replicated by the shield if the ubersaw is being held (AKA instant ubercharge)

404UserNotFound 05-16-2014 03:45

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
Quote:

Originally Posted by rswallen (Post 2138436)
As you know, the ubersaw grants 25% ubercharge whenever it deals damage.
This behaviour seems to be replicated by the shield if the ubersaw is being held (AKA instant ubercharge)

Oh boy. That I did not expect. Any potential issues then with any of the other mediguns? I can't remember if any of the other Mediguns have any "on deal damage" related attributes.

I do have to leave for work now, but I'll try to get as much work on this done as I can when I get home.

Pelipoika 05-16-2014 04:56

Re: [TF2] Medic's Anti-Projectile Shield v1.0
 
1 Attachment(s)
http://31.media.tumblr.com/981b9455b...u2uo1_1280.png

Here's an updated one (?Better?) one:

Requires 75% uber and activates when you press reload.


All times are GMT -4. The time now is 14:18.

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