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

[TF2] Boss Spawner Deluxe v2.0.0


Post New Thread Reply   
 
Thread Tools Display Modes
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-16-2013 , 13:33   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #11

Quote:
Originally Posted by luki1412 View Post
I tried zombie bosses. They are funny xD. I spawn a lot of them at once, because they are weak. They are silent though and all taunt at once. Also only blue ones have been used. Bots kill them too, like regular bosses.

Also about that error, it showed up right after I loaded the plugin using sm command. But if you say that it is not a problem then fine ;)
Yeah lol, they tend to taunt a lot. I swear I've seen a red zombie on occasion. As well, if you're not careful about where you spawn them (like you spam the command while looking at one area), they can end up in a pile somewhere. On the map I use, they end up stuck in a floor in where I believe to be 0,0,0 on the map. That's where the Slay commands come in handy.

Sentry Guns can target the zombies too, and they tend to take them out quickly. I really want to add a health parameter to the zombie command, but from what I've read on the Valve Developer Wiki about the "tf_zombie" entity, they don't have similar variables like Monoculus/Merasmus do, so no health additions, sadly.


Quote:
Originally Posted by friagram View Post
You should change the names of the commands to be clearer, or only use one command an d spawn by name, and just store ent refs in an array. The healthbar should also be stored as an ent ref. also, the healthbar should be set up to work with all of the bosses.
I already changed the commands over to the ones that vman315 put in, hence the change to v1.1

As for the health bar.....yeah if I could fix the Merasmus health bar to accurately display his health, I'd do the same for Monoculus and Horsemann, but not Zombie because I like to spawn many zombies.

Last edited by 404UserNotFound; 07-16-2013 at 13:35.
404UserNotFound is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 07-16-2013 , 13:47   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #12

Quote:
Originally Posted by abrandnewday View Post
As for the health bar.....yeah if I could fix the Merasmus health bar to accurately display his health, I'd do the same for Monoculus and Horsemann, but not Zombie because I like to spawn many zombies.
The most bosses that I have ever spawned was 9 merasmus, 24 hatmen, and 15 eyebosses at once. It was insane. The health bar will flip out of spawn 3 plus eyebosses. It would be nice if we could get a plugin to have boss health in the same layout as tanks.

Quote:
Originally Posted by abrandnewday View Post
EDIT: I forgot that I didn't precache the models for the zombie bosses, mostly because they are an "unused" boss, and they use the same models that players do when using the Voodoo Cursed <Class> Soul items. HHH, Monoc and Meras all precache just fine.
Oh hey that's neat, they actual use souls for the zombie skins. It used to be just a human model. I did not know that they fixed/changed that.
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s

Last edited by captaindeterprimary; 07-16-2013 at 13:53.
captaindeterprimary is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-16-2013 , 13:55   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #13

Quote:
Originally Posted by vman315 View Post
It would be nice if we could get a plugin to have boss health in the same layout as tanks.
I think that's actually possible.

We could probably figure out how to make the tank's healthbar from MvM show up in place of the halloween-based healthbar, and just tie it into the entity like this plugin does.

The parts of code in this plugin you'll need to tweak will be anything with m_iBossHealthPercentageByte in it.

Speaking of m_iBossHealthPercentageByte....why it isn't working is still beyond me. I'm going to look into that a bit further.
404UserNotFound is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-16-2013 , 14:06   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #14

Quote:
Originally Posted by abrandnewday View Post
I think that's actually possible.

We could probably figure out how to make the tank's healthbar from MvM show up in place of the halloween-based healthbar, and just tie it into the entity like this plugin does.
It's likely part of the MvM HUD, so it may not be possible to have it in a standard game.

Quote:
Originally Posted by abrandnewday View Post
The parts of code in this plugin you'll need to tweak will be anything with m_iBossHealthPercentageByte in it.

Speaking of m_iBossHealthPercentageByte....why it isn't working is still beyond me. I'm going to look into that a bit further.
m_iBossHealthPercentageByte is a netprop in the monster_resource entity.

See also: Horsemann Healthbar.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-16-2013 at 14:07.
Powerlord is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 07-16-2013 , 14:11   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #15

Quote:
Originally Posted by Powerlord View Post
It's likely part of the MvM HUD, so it may not be possible to have it in a standard game.
Tank health is visible in non-mvm game styles. At-least I have seen it when using this.
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s
captaindeterprimary is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-16-2013 , 14:27   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #16

Quote:
Originally Posted by vman315 View Post
Tank health is visible in non-mvm game styles. At-least I have seen it when using this.
It's likely a moot point on bosses anyway, as it seems to be related to some of the CTFPlayer netprops (m_bIsMiniBoss and m_bUseBossHealthBar I think?). Bosses don't have those netprops as they're AI constructs instead of actual player bots.

Edit: Actually, tanks are their own class, so it may be that the health bar is associated with the tank entity itself. The other netprops I mentioned are for mvm_bigrock's bosses.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-16-2013 at 17:03.
Powerlord is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 07-16-2013 , 16:03   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #17

The merasmus plugin used Powerlord's horseman healthbar code.
Should probably look into that since it's shorter and easier to read.

I think it only shows 1/4 of it while the health is multiplied by 4 so that i can slay it once it hits the 1/4 mark. Just to skip the animation glitches when it tries to hide.

As for multiple bosses with multiple heathbars, i wonder if i can set a annotation on top of the boss which shows the health.
__________________

Last edited by Chaosxk; 07-16-2013 at 16:03.
Chaosxk is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-16-2013 , 16:39   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #18

Quote:
Originally Posted by Chaosxk View Post
The merasmus plugin used Powerlord's horseman healthbar code.
Should probably look into that since it's shorter and easier to read.

I think it only shows 1/4 of it while the health is multiplied by 4 so that i can slay it once it hits the 1/4 mark. Just to skip the animation glitches when it tries to hide.

As for multiple bosses with multiple heathbars, i wonder if i can set a annotation on top of the boss which shows the health.
I know you can set annotations to appear over players heads, the same should work for entities. Here's something I was working on, I called it the "Admin Anno-tag" system. Feel free to use this for testing and such. Just don't release it as your own, or I'll...well...I don't know what I'll do yet lol. I'm still fine-tuning this to make it good enough to be released.

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <tf2_stocks>

#pragma semicolon 1

#define PLUGIN_VERSION "1.0"

public Plugin:myinfo =
{
    
name "Admin Anno-tags",
    
author "A Brand New Day",
    
description "Adds neat little annotation tags for admins",
    
version PLUGIN_VERSION
}

public 
OnPluginStart()
{
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
user GetEventInt(event"userid");
    new 
client GetClientOfUserId(user);
    
    if (
GetUserFlagBits(client) && ADMFLAG_GENERIC)
    {
        
ShowAdminAnnotation(client);
    }
    return 
Plugin_Continue;
}

public 
Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
user GetEventInt(event"userid");
    new 
client GetClientOfUserId(user);
    
    if (
GetUserFlagBits(client) && ADMFLAG_GENERIC)
    {
        
HideAdminAnnotation(client);
    }
    return 
Plugin_Continue;
}

OnGameFrame()
{
    for(new 
1<= GetMaxClients(); i++)
    {
        if(
TF2_IsPlayerInCondition(iTFCond_Cloaked))
        {
            if(
GetUserFlagBits(i) && ADMFLAG_GENERIC)
            {
                
HideAdminAnnotation(i);
            }
        }
        else if(!
TF2_IsPlayerInCondition(iTFCond_Cloaked))
        {
            if(
GetUserFlagBits(i) && ADMFLAG_GENERIC)
            {
                
ShowAdminAnnotation(i);
            }
        }
    }
}

ShowAdminAnnotation(client)
{
    new 
Handle:event CreateEvent("show_annotation");
    if(
event == INVALID_HANDLE) return;
    
SetEventInt(event"follow_entindex"client);
    
SetEventInt(event"visibilityBitfield"DoFilter(client));
    
SetEventFloat(event"lifetime"86400.0);
    
SetEventString(event"text""Admin");
    
FireEvent(event);
}

HideAdminAnnotation(client)
{
    new 
Handle:event CreateEvent("hide_annotation");
    if(
event == INVALID_HANDLE) return;
    
SetEventInt(event"id"client);
    
FireEvent(event);
}  

DoFilter(client)
{
    new 
bits;
    for(new 
viewer 1viewer <= MaxClientsviewer++)
    {
        if(
client == viewer) continue;
        if(
IsClientInGame(viewer) && IsPlayerAlive(viewer) && IsWithinRange(clientviewer))
        {
            
bits |= (<< viewer);
        }
    }
    return 
bits;
}

bool:IsWithinRange(clientviewer)
{
    new 
Float:clientpos[3], Float:viewerpos[3];
    
GetClientAbsOrigin(clientclientpos);
    
GetClientAbsOrigin(viewerviewerpos);
    if(
GetVectorDistance(clientposviewerpos) <= 500.0) return true;
    else return 
false;


Last edited by 404UserNotFound; 07-16-2013 at 16:46.
404UserNotFound is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 07-16-2013 , 17:22   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #19

PHP Code:
public OnGameFrame() {
    for(new 
1<= MaxClientsi++) {
        if(
CheckCommandAccess(i"sm_tags_override"ADMFLAG_GENERICtrue)) {
            new 
bool:cloaked TF2_IsPlayerInCondition(iTFCond_Cloaked);
            switch(
cloaked) {
                case 
trueHideAdminAnnotation(i);
                case 
falseShowAdminAnnotation(i);
            }
        }
    }

Went to fix the OnGameFrame part. Should be public or else it won't run.
GetMaxClients() is also depreciated, so i changed it to MaxClients
Also changed GetUserFlagBits(i) to CheckCommandAccess(i) so people can override Admin Generic to something else.

Anyways, thanks for the code. I obviously won't post it as mine lol.
I'll test this on bosses whenever i'm not lazy.
__________________
Chaosxk is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-16-2013 , 17:33   Re: [TF2] Boss Spawner Deluxe v1.1
Reply With Quote #20

Quote:
Originally Posted by Chaosxk View Post
PHP Code:
public OnGameFrame() {
    for(new 
1<= MaxClientsi++) {
        if(
CheckCommandAccess(i"sm_tags_override"ADMFLAG_GENERICtrue)) {
            new 
bool:cloaked TF2_IsPlayerInCondition(iTFCond_Cloaked);
            switch(
cloaked) {
                case 
trueHideAdminAnnotation(i);
                case 
falseShowAdminAnnotation(i);
            }
        }
    }

Went to fix the OnGameFrame part. Should be public or else it won't run.
GetMaxClients() is also depreciated, so i changed it to MaxClients
Also changed GetUserFlagBits(i) to CheckCommandAccess(i) so people can override Admin Generic to something else.

Anyways, thanks for the code. I obviously won't post it as mine lol.
I'll test this on bosses whenever i'm not lazy.
Oh my god, you sir are amazing with turning my old-school code into new-school code. I bow to you.
404UserNotFound 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 10:46.


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