AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   VSH / Freak Fortress (https://forums.alliedmods.net/forumdisplay.php?f=154)
-   -   VSH Versus Saxton Hale 1.55 - New Saxton Hale + Vagineer Models! (https://forums.alliedmods.net/showthread.php?t=244209)

WildCard65 07-15-2014 10:44

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
did you clone to repo?
If so do this: git commit -a
then after you fill in a commit message(and saved, and then exitted editting program), do this: git push

Powerlord 07-15-2014 11:01

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by WildCard65 (Post 2167997)
Added you to list of collaborators, you now have push access to the VSH repo I made without need of using PRs.

@FlaminSarge I need you to verify that your github name is FlaminSarge

What's the point in creating a Github for someone else?

If they're going to use it, they can create their own. This would also put it in their ownership rather than yours. (i.e. Chdata/vsh instead of WildCard65/vsh)

If I create a Github of someone else's code, it's not because I'm being altruistic, it's because I'm modifying the copy I created of it (see my gscramble-redux github and its two branches).

Wliu 07-15-2014 11:39

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by Powerlord (Post 2168092)
What's the point in creating a Github for someone else?

If they're going to use it, they can create their own. This would also put it in their ownership rather than yours. (i.e. Chdata/vsh instead of WildCard65/vsh)

If I create a Github of someone else's code, it's not because I'm being altruistic, it's because I'm modifying the copy I created of it (see my gscramble-redux github and its two branches).

I agree to this.
Though you can also transfer ownership of a repo in Settings-->Danger Zone.

@Chdata: Are you sure you want Mantreads to insta-kill Hale? o.O

Advokat 07-15-2014 11:50

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by Wliu (Post 2168116)
I agree to this.
Though you can also transfer ownership of a repo in Settings-->Danger Zone.

@Chdata: Are you sure you want Mantreads to insta-kill Hale? o.O

Perhaps he means stuns like the sandman. Haven't chucked this up on our server yet so I can't confirm.

nergal 07-15-2014 12:27

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Here's a quick update for my healthbar thingy from Powerlord :>

How to add FF2-style Monoculus Healthbar (props to Powerlord since this is ripped from his plugin)

In the function OnMapStart() add this piece of code anywhere inside the function

PHP Code:

    FindHealthBar(); 

after that, add this global variable+function anywhere in the plugin as long as it doesn't interfere with other functions

PHP Code:

new g_healthBar = -1;
FindHealthBar()
{
    
g_healthBar FindEntityByClassname2(-1"monster_resource");
    if (
g_healthBar == -1)
    {
        
g_healthBar CreateEntityByName("monster_resource");
        if (
g_healthBar != -1DispatchSpawn(g_healthBar);
    }


the code above simply adds the healthbar, now we gotta make it work.

add this function anywhere in the plugin, as long as it doesn't interfere with other functions

PHP Code:

public UpdateBossHealth(client)
{
    new 
halebar;
    if (
IsValidClient(client)) halebar = (HaleHealthMax <= 0) ? RoundToCeil(float(HaleHealth) / HaleHealthMax 255);
    else 
halebar 0;
    
SetEntProp(g_healthBarProp_Send"m_iBossHealthPercentageByte"halebar);


That should get the healthbar to work Now there's two choices to make. Do you want the health bar to dynamically update by itself? OR Have the health bar update only when checking Hale/Boss health?

IF you want the health bar to update itself. Simply put this code inside the function
PHP Code:

public  Action:HaleTimer(Handle:hTimer

When you've located that function, put this code in it. Remember to put it somewhere that doesn't interfere with the rest of the code.
PHP Code:

    UpdateBossHealth(Hale); 

OR

If you want the health bar to update only from Health Checking, then find the following function
PHP Code:

public Action:Command_GetHP(client

After you've located it, put the UpdateBossHealth(Hale); code twice inside the function. For best results, place it the 1st one under client == Hale and switch Special
like this
OLD
PHP Code:

    if (client == Hale)
    {
        switch (
Special)
        { 

NEW
PHP Code:

if (client == Hale)
    {
        
UpdateBossHealth(Hale);
        switch (
Special)
        { 

After you've done that, place the second function check under
PHP Code:

    if (GetGameTime() >= HPTime

for example, like this!
PHP Code:

    if (GetGameTime() >= HPTime)
    {
        
UpdateBossHealth(Hale);
        
healthcheckused++;
        switch (
Special)
        { 

end tutorial!

nergal 07-15-2014 12:41

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
I'd also like to state that I've successfully fixed the "First Round Glitch or FRG" (the frg is when, after playing the 1st round of arena and then 2nd round being 1st round of saxton hale, players will usually/sometimes not have the intended weapon switches/changes)

Change this
PHP Code:

public Action:StartHaleTimer(Handle:hTimer)
{
    
CreateTimer(0.1GottamTimer);
    if (!
IsValidClient(Hale))
    {
        
VSHRoundState 2;
        return 
Plugin_Continue;
    }
    if (!
IsPlayerAlive(Hale))
    {
        
TF2_RespawnPlayer(Hale);
    }
    
playing 0;
    for (new 
client 1client <= MaxClientsclient++)
    {
        if (
IsValidClient(client) && (client != Hale) && IsPlayerAlive(client))
        {
            
playing++;
            
CreateTimer(0.15MakeNoHaleGetClientUserId(client));
        }
    } 

To this!
PHP Code:

public Action:StartHaleTimer(Handle:hTimer)
{
    
CreateTimer(0.1GottamTimer);
    if (!
IsValidClient(Hale))
    {
        
VSHRoundState 2;
        return 
Plugin_Continue;
    }
    if (!
IsPlayerAlive(Hale)) TF2_RespawnPlayer(Hale);
    
playing 0;
    for (new 
1<= MaxClientsi++)
    {
        if (!
IsClientInGame(i) || !IsPlayerAlive(i) || == Hale) continue;
        
playing++;
        
CreateTimer(0.2MakeNoHaleGetClientUserId(i));
    } 

Then change this
PHP Code:

public Action:event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (!
IsValidClient(clientfalse))
        return 
Plugin_Continue;
    if (!
Enabled)
        return 
Plugin_Continue;
    
SetVariantString("");
    
AcceptEntityInput(client"SetCustomModel");
    if (
client == Hale && VSHRoundState && VSHRoundState != -1)
        
CreateTimer(0.1MakeHale);
    else if (
VSHRoundState >= 0)
    {
        if (!(
VSHFlags[client] & VSHFLAG_HASONGIVED))
        {
            
VSHFlags[client] |= VSHFLAG_HASONGIVED;
            
RemovePlayerBack(client, { 57133231405444608642 }, 7);
            
RemovePlayerTarge(client);
            
TF2_RemoveAllWeapons(client);
            
TF2_RegeneratePlayer(client);
            
CreateTimer(0.1Timer_RegenPlayerGetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
        }
        
CreateTimer(0.2MakeNoHaleGetClientUserId(client));
    } 

to this!
PHP Code:

public Action:event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (!
IsValidClient(clientfalse)) return Plugin_Continue;
    if (!
Enabled) return Plugin_Continue;
    
SetVariantString("");
    
AcceptEntityInput(client"SetCustomModel");
    if (
client == Hale && VSHRoundState && VSHRoundState != -1CreateTimer(0.1MakeHale);

    if (
VSHRoundState != -1)
    {
        
CreateTimer(0.2MakeNoHaleGetClientUserId(client));
        if (!(
VSHFlags[client] & VSHFLAG_HASONGIVED))
        {
            
VSHFlags[client] |= VSHFLAG_HASONGIVED;
            
RemovePlayerBack(client, { 57133231405444608642 }, 7);
            
RemovePlayerTarge(client);
            
TF2_RemoveAllWeapons(client);
            
TF2_RegeneratePlayer(client);
            
CreateTimer(0.1Timer_RegenPlayerGetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
        }
    } 


rswallen 07-15-2014 12:50

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by nergal (Post 2168149)
-[snip]- healthbar thingy -[snip]-

Why you no use EntRefs D:

Wliu 07-15-2014 13:56

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by nergal (Post 2168157)
*SNIP*

FF2 fixed the FRG by removing the internal round state code and instead relying on GameRules_GetRoundState, which may or may not have been a better solution.

Powerlord 07-15-2014 15:12

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by nergal (Post 2168149)
Here's a quick update for my healthbar thingy from Powerlord :>

Didn't I already write a healthbar plugin for VSH? Unlike FF2, VSH actually had/has natives to expose the boss's health, hence I was able to write it as an external plugin.

Chdata 07-15-2014 18:26

Re: Versus Saxton Hale 1.43 - Now with collaboration! (Last updated 7/15/2014)
 
Quote:

Originally Posted by Wliu (Post 2168116)
I agree to this.
Though you can also transfer ownership of a repo in Settings-->Danger Zone.

@Chdata: Are you sure you want Mantreads to insta-kill Hale? o.O

Not exactly insta-kill.

If Hale is less than or equal to 1024 HP, it can insta kill him instead of leaving him at 1 HP (which used to happen because the mantread damage was handled in player_hurt instead of ontakedamage).

Yeah I know the wording is off though.

Edit: * Mantread stomps now OHKO Hale instead of leaving him at 1 health when his health is less than the damage mantreads do (1024 dmg).

I suppose I'll look up github tuts or w/e. Then I can add nergal's FRoG. Not the healthbar thing if it's another plugin already, but I added that to optional installations in the op.


All times are GMT -4. The time now is 23:49.

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