Re: [hlcoders] Zone Entities

2002-06-16 Thread Daniel Koppes

Well... does a player trigger the Touch() function every frame as long as he
is inside the entity?

You could clear the flag in the players PreThink() function, and set it in
the Touch() function.

Thusly, if they leave, the flag is no longer updated and is cleared.

Or something like that.


- Original Message -
From: Mazor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 16, 2002 9:44 PM
Subject: [hlcoders] Zone Entities


 This is a multi-part message in MIME format.
 --
 [ Picked text/plain from multipart/alternative ]
 I need to figure out how to code in zone type entities into my mod. I
 can get the base entity part, but I need to figure out how to flag a
 player when he's in the entity and then how to reset the flag when he's
 exited the entity's bounds. any ideas how?

 -Mazor
 ___
 To unsubscribe, edit your list preferences, or view the list archives,
please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




RE: [hlcoders] Zone Entities

2002-06-16 Thread Mazor

Then wouldn't the flag end up flip flopping every frame? One frame on,
one frame off, one frame on, one frame off it would cause a headache
when trying to examine it... wouldn't it?

-Mazor

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Daniel
Koppes
Sent: Sunday, June 16, 2002 5:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] Zone Entities

Well... does a player trigger the Touch() function every frame as long
as he
is inside the entity?

You could clear the flag in the players PreThink() function, and set it
in
the Touch() function.

Thusly, if they leave, the flag is no longer updated and is cleared.

Or something like that.


- Original Message -
From: Mazor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 16, 2002 9:44 PM
Subject: [hlcoders] Zone Entities


 This is a multi-part message in MIME format.
 --
 [ Picked text/plain from multipart/alternative ]
 I need to figure out how to code in zone type entities into my mod. I
 can get the base entity part, but I need to figure out how to flag a
 player when he's in the entity and then how to reset the flag when
he's
 exited the entity's bounds. any ideas how?

 -Mazor
 ___
 To unsubscribe, edit your list preferences, or view the list archives,
please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




Re: [hlcoders] Zone Entities

2002-06-16 Thread Cortex

You can make something like this in the Think function :

for ( loop_through_all_players )
{
if ( pPlayer-pev-origin.x  pev-abs.x ...
/*some other tests to verify that the origin of the*/
/*players is between hte absmax and absmin values*/ )
{
// set the flag :
pPlayer-m_CortexsFlag |= IN_ZONE; // lol
}
else
{
pPlayer-m_CortexFlag
}
}

Here you are :) So, you don't need to set a Touch() function.

 - Cortex : HL Albator coder and mapper ( www.hlalbator.fr.st )
 - email : [EMAIL PROTECTED]ICQ : 71548738


- Original Message -
From: Mazor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 16, 2002 12:50 PM
Subject: RE: [hlcoders] Zone Entities


| Then wouldn't the flag end up flip flopping every frame? One frame on,
| one frame off, one frame on, one frame off it would cause a headache
| when trying to examine it... wouldn't it?
|
| -Mazor
|
| -Original Message-
| From: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED]] On Behalf Of Daniel
| Koppes
| Sent: Sunday, June 16, 2002 5:24 AM
| To: [EMAIL PROTECTED]
| Subject: Re: [hlcoders] Zone Entities
|
| Well... does a player trigger the Touch() function every frame as long
| as he
| is inside the entity?
|
| You could clear the flag in the players PreThink() function, and set it
| in
| the Touch() function.
|
| Thusly, if they leave, the flag is no longer updated and is cleared.
|
| Or something like that.
|
|
| - Original Message -
| From: Mazor [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| Sent: Sunday, June 16, 2002 9:44 PM
| Subject: [hlcoders] Zone Entities
|
|
|  This is a multi-part message in MIME format.
|  --
|  [ Picked text/plain from multipart/alternative ]
|  I need to figure out how to code in zone type entities into my mod. I
|  can get the base entity part, but I need to figure out how to flag a
|  player when he's in the entity and then how to reset the flag when
| he's
|  exited the entity's bounds. any ideas how?
| 
|  -Mazor
|  ___
|  To unsubscribe, edit your list preferences, or view the list archives,
| please visit:
|  http://list.valvesoftware.com/mailman/listinfo/hlcoders
| 
| 
|
| ___
| To unsubscribe, edit your list preferences, or view the list archives,
| please visit:
| http://list.valvesoftware.com/mailman/listinfo/hlcoders
| ___
| To unsubscribe, edit your list preferences, or view the list archives,
please visit:
| http://list.valvesoftware.com/mailman/listinfo/hlcoders
|
|


___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




Re: [hlcoders] Zone Entities

2002-06-16 Thread botman

 I need to figure out how to code in zone type entities into my mod. I
 can get the base entity part, but I need to figure out how to flag a
 player when he's in the entity and then how to reset the flag when he's
 exited the entity's bounds. any ideas how?

If you have an origin of an entity (func_zone or whatever) and you know the
bounding box size of the entity (pev-mins, pev-maxs), it's a fairly simple
task to determine if a player origin is between the entity min and max
coordinates...

if ((player.x = entity.min.x)  (player.x = entity.max.x) 
(player.y = entity.min.y)  (player.y = entity.max.y) 
(player.z = entity.min.z)  (player.y = entity.max.z))
{
   // think inside the box
}

...of course this assumes that the bounding box of the entity is axially
aligned (aligned with the X, Y, and Z axis).

Jeffrey botman Broome

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders