#Player Sentry

1 messages · Page 1 of 1 (latest)

glacial stream
#

https://github.com/Outerbeast/Player-Sentry
Build your very own sentry gun using your pipewrench
Equip your pipewrench and press Tertiary attack to build your sentry which will cost your armour
your armour will become the sentry's base health
You can also carry your sentry to another location: with the pipewrench equipped, press Use on your sentry to pick it up and put it down. You can also delete your sentry while carrying by pressing Reload

Install instructions and more detailed info are included in the guide section
Enjoy!

GitHub

Player buildable sentry for Sven Co-op. Contribute to Outerbeast/Player-Sentry development by creating an account on GitHub.

white dagger
#

cool stuff, i will include this if I ever update Frostline

glacial stream
wheat wadi
#

Looks like an incredible update, looking forward to it!

jagged locust
glacial stream
#

It's pretty much done, but I need to do some tedious testing

steep nova
#

How does this impact on doors and movable ents?, will block them like a regular sentry?

glacial stream
#

Yes

drifting relic
#

So I have a problem, these days I managed to load your script on the yabma map

#

Now I've gone again It's not working anymore what can it be

glacial stream
# drifting relic Now I've gone again It's not working anymore what can it be

After a dm conversation the problem was cause by: user installed modded dlls!
https://github.com/hzqst/metamod-fallguys/releases/tag/v20230330a
This breaks the script because this addon replaces a stock SC API hook ID, so instead of registering the function to the intended hook responsible for weapon tertiary attack event, it registers the function to some custom hook PlayerMovePlaySoundFXHook which was inserted into the game by this addon

lusty scaffold
glacial stream
# lusty scaffold I don't think it's reasonable to register hooks with something like hardcoded nu...

The intention was to make an alias for each of the weapon attack hook IDs to make it easy for end users to customise which attack button they wanted to use to build the sentry

The issue was I couldn't directly set the hook ID values in the enum: because of how Angelscript is extremely anal about typing, there is a unfortunate bug that arises when trying to do what I mentioned previously - read this thread to get an understanding of this problem #818992669413212170 message

#

TL;DR - AS backed me into a corner

lusty scaffold
glacial stream
#

What I want to know is how the custom hook code is interfering with the script

lusty scaffold
#

it's uint indeed

#

enum = signed int

#

you can't assign an uint with signed int without explicit conversion

#

uint iSentryWeaponAttackType = uint(WPN_TERTIARY_ATTACK);// this is probably what you want

alpine iris
#

Enums are a convenient way of registering a family of integer constants that may be used throughout the script as named literals instead of numeric constants.

#

yeah, enum = const int family

#

and the simplest way to patch is this, using comments to remind others of the options available, no enum, no if-else

drifting relic
# glacial stream After a dm conversation the problem was cause by: user installed modded dlls! ht...

exactly.
and as an alternative to Metamod-P
I'm Testing This:
https://dev-cs.ru/resources/415/

Which is working only with AMXX.

  • Seemingly no conflict.
    With this Tower Script. Until now.

On the other hand:
This Metamod-P
Not compatible with Fall Guys Season 3*

As an alternative I am using the season 2 version
s2_nomm_resouces.zip - Written in Angel Script.

Thank you for your support @glacial stream

glacial stream
#

Big Update!: A lot of new features were added to Player Sentry

  • New weapon_sentry custom weapon, lets you build a "disposable" like weapon_tripmine
  • Map cfg cvars to change sentry settings
  • Callbacks for sentry events
    Check the guide for more information

My huge thanks to:-
@agile gale for creating the weapon_sentry models
@proud moon for the weapon_sentry sprites

proud moon
#

excellent

valid trellis
#

PERFECT for defend/horde maps mikk_approves

exotic wedge
merry mauve
#

Hi. Does it give you score as it deals damage to the enemy?

glacial stream
#

Planned feature for SC 5.26, there isn't a way to (easily) implement that yet

merry mauve
glacial stream
merry mauve
#

I tried both. Load it with map_script and add it to a plugin.

#

Same error.

glacial stream
#

Don't add it to a plugin, otherwise that error happens

merry mauve
#

Ok, I did the map_script thing and it gave me the same error.

glacial stream
#

thats not right

#

post the angelscript log here

merry mauve
#

i need this

merry mauve
#

Now it's not giving me any logs whatsoever and doesn't load either.

glacial stream
#

Go into listenserver.cfg and add this
as_log_level 3

#

then try again

merry mauve
#

Alright, where do I find the log now?

glacial stream
#

u wot

merry mauve
glacial stream
#

None of that looks right.

#

just go into sandstone.cfg and add map_script player_sentry, don't do anything else

#

Undo what you did before in the cfg, remove whatever sandstone/sandstone_sentry is

merry mauve
#

Now it gives me

Registering hook: module 'MapModule', hook 'ClientDisconnect', function 'PLAYER_SENTRY::PlayerLeave'
Registering hook: module 'MapModule', hook 'WeaponTertiaryAttack', function 'PLAYER_SENTRY::DeploySentryAttack'
ERROR: Failed to add plugin 'Player Sentry'!
1 plugin(s) failed compilation```
merry mauve
glacial stream
#

why do you have it in quotes

merry mauve
#

Doesn't matter, even if I remove the quotes, still doesn't load.

#

And yes, I believe I received the GetUserData error, because I added it to the plugin

glacial stream
#

I know

#

GetUserData is an API method that is only usable from map_scripts

merry mauve
#

Ah, sh--

glacial stream
#

ergo, the plugin module doesn't recognise that method, throwing an error

merry mauve
#

Would be cool if it did

glacial stream
#

so thats why I told you to not add it as a plugin

merry mauve
#

I mean it's a weapon that creates a monster. Just like weapon_scorpion or weapon_clhornetgun

glacial stream
#

If you really want to make it available for all maps, add map_script player_sentry to default_map_settings.cfg

merry mauve
#

It worked. Next thing is, the weapon_sentry. I am trying to do give weapon_sentry and it says NULL Ent

glacial stream
#

Build the sentry using piperwrench tertiary attack, you need armour

merry mauve
#

Thank you for your help.

glacial stream
#

No worries, I hope you enjoy building sentries

proud moon
#

sentry coming up

merry mauve
#

Works like a charm, thank you so much again, friend.

#

One more thing that I wanted to share. This gives you 1 score point if a sentry is deployed. Just a suggestion.
` void PrimaryAttack()
{
if( IsEmpty() )
return;

    @fnPlaceSentry = g_Scheduler.SetTimeout( this, "PlaceSentry", flPlaceDelay );
    m_pPlayer.SetAnimation( PLAYER_ATTACK1 );
    self.SendWeaponAnim( SENTRY_DROP );
    self.m_flNextPrimaryAttack = g_Engine.time + flPlaceDelay;
m_pPlayer.pev.frags += 1;
}`
devout quiver
#

Can you make this sentry gun to be non-solid to players? It seem can trolling at blocking door/vent and smash teamkill in an elevator.

glacial stream
#

To fix the one problem with blocking by making it nonsolid will introduce 5 new problems that can't be fixed, so no.

Trolls are going to troll but that responsibility shouldn't be mine, that should be taken up to the server moderators, so no +1

#

inb4 only nonsolid to players- that type of control over selective collision doesn't exist in goldsrc

#

Any player who built a sentry disconnects will have their sentry removed from the game, so its a case of a troll who is blocking to be kicked from the game

devout quiver
#

Or make the sentry can be move away from teammates ?

glacial stream
#

appreciate the thoughts and the suggestions about anti-troll measures but unfortunately it either can't be done because the solution isn't possible or feasible or it wont be done because its not worth the effort

#

And as I said before, I shouldn't have to go out of my way to deal with trolls abusing the buildable sentries because its no longer my problem and it belongs to the server's moderators, if they even exist

#

My suggestion would be to play in servers that have moderators that will respond to trolls

#

Please don't suggest any more anti-troll measures, thanks

steep nova
devout quiver
#

Another question : Do Sentry gun's name will display the owner's name?

#

so the moderator will know the sentry gun belong to who.

glacial stream
#

Yes but the sentry's name will not change if the owner changes their name after building it

devout quiver
#

still fine, moderator still know the name if player saw them immediately

magic halo
#

@glacial stream Sorry for necroposting, but would there be a way for you to convert this into a plugin? Map scripts don't work everywhere after all.

#

Just installed and ran it a hour ago, I love this so much

glacial stream
#

Sorry but no

magic halo
#

Aw...

craggy trout
craggy trout
glacial stream
glacial stream
steep nova
#

Hey I wanted to test this script loading it as a plugin script instead of map script but got this:

ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (199, 25) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (200, 29) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (214, 13) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (234, 13) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (247, 48) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (348, 13) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (366, 17) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (383, 13) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (476, 17) : No matching symbol 'GetUserData'
ERROR: d:/tcafiles/users/fnx1475/1778/svencoop_addon/scripts/maps/player_sentry.as (495, 78) : No matching symbol 'GetUserData'
ERROR: Plugin script compilation failed

Pretty much the script is like this:

#include "player_sentry"

// Plugin information
void PluginInit()
{
    g_Module.ScriptInfo.SetAuthor( "Cadaver" );
    g_Module.ScriptInfo.SetContactInfo( "-" );
}

void MapInit()
{
    PLAYER_SENTRY::WeaponRegister();
}

Any idea why this could happend?

craggy trout
#

GetUserData is map-script only

glacial stream
steep nova
#

o

silver yew
#

I've been trying to add weapon_sentry to some maps and I've noticed that if the map already has other custom weapons registered, then there is an issue where the player will automatically holster weapon_sentry within a second after they draw it.

glacial stream
#

Do you have a video?

silver yew
#

Looking into it a bit more and have some more findings, will post a vid here in a bit

#

Ok, so interestingly from what I can tell this happens:
a) Only on maps with custom weapons registered
b) Only occurs on said map if the player has any weapons outside slot 4
If you only have nades or satchels for example then it remains in your hand.

glacial stream
#

So when you disable those custom weapons, what happens?

silver yew
#

Works as normal!

glacial stream
#

Wonder if its a slot issue.

#

Conflicting weapons fighting for the same slot

silver yew
#

I've tried adjusting both the slot and position values and the behaviour remains the same. Usually when there is a conflict for a slot you simply can't select the weapon at all

glacial stream
#

I know that issue as well happens too

#

I was just wondering if the two are linked

#

I dont have another explanation for it otherwise

#

Is it any custom weapon or a particular one?

silver yew
#

It's any, from what I can tell. The map in the above video uses those CS weapons but I've also replicated the same problem using some of my own weapon scripts

#

Probably also worth noting that I found this to be the case irrespective of what weapons slots the registered weapons were in, e.g. i tried once with 1 weapon registered on slot 0 and it still occurred

silver yew
#

I did some more digging and figured it out. The conflict seems to lie with the primary ammo index rather than the slots/position. If I removed this from weapons.as then it works as designed:

    int PrimaryAmmoIndex()
    {
        return 1;
    }
#

Equally you can leave it in and it will work as long as it is the first weapon to be registered on the map

glacial stream
#

Forgot why I put that in. Must have been an important reason.

#

Else I wouldn't have put it there.

glacial stream
#

I should spam my code with more comments moving forward...

#

I'll make a commit with that method removed at some point, but I want to know if there are further things that need their attention so those can be addressed as well
then everything can be done in one go

#

thanks for looking into this!

glacial stream
silver yew