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

Question about groupinfo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GasmoN
Member
Join Date: Jul 2014
Old 01-18-2021 , 16:51   Question about groupinfo
Reply With Quote #1

So, what I am trying to do is that when Player from CT team create a wall entity, only that player, and whole CT team can pass through that wall, and T team can't. Also, wall has to take damage from T team only.

Attempt #1
Here, everything works except T can't damage the wall.
Reason: Wall can't take damage because it's SOLID_TRIGGER (don't know the fix tho)
Spoiler


Attempt #2
In this example, literally everything works, but when I am CT, I can go through T players.
Reason: I'm not 100% sure.
Spoiler


What I am trying to avoid? AddToFullPack, and similar cpu expensive forawrds/functions.

Last edited by GasmoN; 01-18-2021 at 16:52.
GasmoN is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-19-2021 , 04:20   Re: Question about groupinfo
Reply With Quote #2

GR_CT => 2

#define GR_CT 2

This will solve CT colliding with zombies

But you have also need to create another entity displayer for the CT so he can see the sandbag and set it solidity to none so he can cross it.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-19-2021 at 04:25.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
GasmoN
Member
Join Date: Jul 2014
Old 01-29-2021 , 17:37   Re: Question about groupinfo
Reply With Quote #3

So insted of having maximum 50 created entities on the map, I should have 100? That's doesn't help to be honest. Is there any way to "drag" player through that wall? For example, if I am going at wall's direction, as long as I touch the wall, my position will be increased by 1.1 at the location where I am trying to go. I mean, to do something similar that Force Field grenade do with zombies when they touch it (It pushes them back), but in reverse.

Another thing that I have tried is to set team for that wall to CS_TEAM_CT (with pev_team) and "trick" this semiclip module https://forums.alliedmods.net/showthread.php?t=250891 to make it NOT solid for CT players, but didn't had luck with that.
(In semiclip module, settings are set so CT players can go through each other so I tought it will work with this wall to since it's the same team)
GasmoN is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-29-2021 , 19:03   Re: Question about groupinfo
Reply With Quote #4

there's a possible way is to set the entity to not solid when a CT touch it and when he/she is in it size.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
GasmoN
Member
Join Date: Jul 2014
Old 01-30-2021 , 08:01   Re: Question about groupinfo
Reply With Quote #5

True, but than when stop touching the entity, it will still be NOT solid. Also, in the mid time, wall would't take any damage if CT is touching it because of it's SOLID_NOT flag.
So, I only came up with this poor way to do this, so if anyone got any other idea, I am open for suggestions/advices.

PHP Code:
#define TASK_SOLID_HUMAN        192382
#define GR_CT                            2 & 1                    
#define GR_T                                2 | 1
#define GR_PALLET                        1

new bool:g_TaskSet[33];

set_pev(entpev_groupinfoGR_PALLET// When wall is created

public task_solid_human(TASK)
{
    new 
id TASK TASK_SOLID_HUMAN;
    
    if(!
is_user_connected(id))
    return;
    
    
set_pev(idpev_groupinfoGR_T);
    
g_TaskSet[id] = false;
}

public 
fw_touch_pallet(enttouched)
{    
    switch(
g_IsZombie[touched])
    {
        case 
false:
        {
            
set_pev(touchedpev_groupinfoGR_CT);
            
            switch(
g_TaskSet[touched])
            {
                case 
false:
                {
                    
remove_task(touched+TASK_SOLID_HUMAN);
                    
set_task(1.0"task_solid_human"touched+TASK_SOLID_HUMAN);
                    
g_TaskSet[touched] = true;
                }
            }            
        }
    }    
}

public 
zp_fw_core_cure_post(id)
{
    
set_pev(idpev_groupinfoGR_T)
}

public 
zp_fw_core_infect_post(id)
{
    
set_pev(idpev_groupinfoGR_T)

GasmoN is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-30-2021 , 13:14   Re: Question about groupinfo
Reply With Quote #6

maybe this thread can help you (epsecially explanation by klippy): https://forums.alliedmods.net/showthread.php?t=312056

good luck
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis 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 21:39.


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