> 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
> }
...and of course that should be "(player.z <= entity.max.z))" (n
> 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
: 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
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(
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.
5 matches
Mail list logo