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

Solved pev_groupinfo thing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-14-2018 , 12:34   pev_groupinfo thing
Reply With Quote #1

hello. im making an invisible entity at the same origin (and mins+maxs) as an existing in the map (doors, and that doors became SOLID_NOT )
what is the problem?
i want to make it, when player1 uses button which triggers that door -> make it non-solid to player1 (but remain solid to everyother players)...so in that case im using: pev_groupinfo by id
but its not working well...its changing solidiy to all players not to only one...can anyone help?

using this:
PHP Code:
set_peventpev_groupinfopeventpev_groupinfo ) | id 
later making 4.0 delay to reset that entity to the same player:
Code:
set_pev( ent , pev_groupinfo, pev( ent, pev_groupinfo ) & ~id )
its all happening, but not for one player but to all players
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 11-15-2018 at 08:13.
JocAnis is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-14-2018 , 16:34   Re: pev_groupinfo thing
Reply With Quote #2

I believe that instead of "| id and & ~id" you must use something like this
Code:
set_pev( ent, pev_groupinfo, pev( ent, pev_groupinfo ) | ( 1<<(id & 31) )
Same idea for resetting the entity.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-14-2018 , 16:53   Re: pev_groupinfo thing
Reply With Quote #3

hmm i have 0 knowledge about bitsums, so i have seen it here: https://forums.alliedmods.net/showpo...2&postcount=14 (and even one more link which explained how to unreset/reset)

i would be really happy if that's working..gonna test soon
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 11-14-2018 at 18:00.
JocAnis is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-14-2018 , 18:00   Re: pev_groupinfo thing
Reply With Quote #4

its fixed now...Kusfield and i went with this adventure, with many combinations of bits, and finally came to solution, when you have more entities:

PHP Code:
//on players spawn:
set_pevidpev_groupinfo0xFFFFFFFF )

//when creating entity:
set_peventpev_groupinfo1<<current_ent )
//g_ent[ current_ent++ ] blabla

//set solid_not to that one entity for player1: Must be reversed bit than the entity's 
set_pevidpev_groupinfo, ~(1<<CURRENT_ENT_BIT) )

//to make it solid again for player1:
set_pevidpev_groupinfo0xFFFFFFFF 
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 11-15-2018 at 08:17. Reason: solved thanks to kusfield
JocAnis is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-16-2018 , 02:30   Re: pev_groupinfo thing
Reply With Quote #5

What is CURRENT_ENT_BIT?
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
JocAnis
Veteran Member
Join Date: Jun 2010
Old 11-16-2018 , 08:29   Re: pev_groupinfo thing
Reply With Quote #6

you must somehow catch that entity's bit, created with:

PHP Code:
//when creating entity:
set_peventpev_groupinfo1<<current_ent )
//g_ent[ current_ent++ ] blabla 
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-16-2018 , 08:41   Re: pev_groupinfo thing
Reply With Quote #7

IF ent1.groupinfo != 0 AND ent2.groupinfo != 0 AND ent1.groupinfo & ent2.groupinfo == 0 ==> ent1 and ent2 can't interact (see or collide). That's all there is to it. How you are going to use that is up to you.
__________________

Last edited by klippy; 11-16-2018 at 08:41.
klippy is offline
Reply


Thread Tools
Display Modes

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 19:29.


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