pev_groupinfo thing
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:
Code:
set_pev( ent , pev_groupinfo, pev( ent, pev_groupinfo ) & ~id ) |
Re: pev_groupinfo thing
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) ) |
Re: pev_groupinfo thing
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 |
Re: pev_groupinfo thing
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:
|
Re: pev_groupinfo thing
What is CURRENT_ENT_BIT?
|
Re: pev_groupinfo thing
you must somehow catch that entity's bit, created with:
PHP Code:
|
Re: pev_groupinfo thing
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.
|
All times are GMT -4. The time now is 06:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.