I will forward on the request for some kind of iterator in IGameEvent,
seems a reasonable thing. Note that you can load the various event files
(modevents.res, serverevents.res, gameevents.res) at run time to get the
format of all the events being used.
- Alfred
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Damaged Soul
Sent: Saturday, February 19, 2005 6:39 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] IGameEventManager/IGameEventListener
I would love to use the newer system and I understand that it probably
is more efficient. But is there any chance that IGameEvent will be
expanded to allow the things I stated previously with getting an event
param type or iterating through all the arguments/params of a particular
event? Using KeyValues in the older system allowed me to do such things
and I'd really like to have such functionality, more specifically for
logging every event that occurs along with every param/argument name and
its value. As an example, when the player_team event occurs, I would log
data such as this without actually having to know what each param name
was:
Event - player_team
Arg 1: userid 2
Arg 2: team 2
Arg 3: oldteam 0
Arg 4: disconnect 0
On Sat, 19 Feb 2005 17:43:36 -0800, Alfred Reynolds
[EMAIL PROTECTED] wrote:
The old event system had way too much overhead when we start adding
more verbose events (such as firing one each time a footstep is
triggered, something that bots use). The new system is much more
efficient, it only creates and delivers events when a listener exists.
You should upgrade to the new system.
- Alfred
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Damaged
Soul
Sent: Saturday, February 19, 2005 1:05 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] IGameEventManager/IGameEventListener
I'm curious as to why Valve decided to change these interfaces and use
IGameEvent rather than KeyValues.
One guess that I have, is that KeyValues has more methods than is
really needed for game events. KeyValues has extra things for getting
and setting pointer and color data types. Events only use Bool, Int,
Float, and String data types so those extra methods are not needed for
events.
And I would guess that is why IGameEvent is used instead now.
However, by using IGameEvent, a little power is lost as a result. With
KeyValues I was able to determine the data type of a particular
param/argument and also iterate through the list of params/arguments
for an event that had occurred. This kind of thing was very useful for
creating a logging system to print data about every event that occurs
without having to explicitly get the value of a key. I did not have to
actually know the names of all the event params in order to do this.
I have noticed that I am currently still able to use the older
IGameEventListener to do what I want, however the comments in
igamevents.h state it should not be used and is for legacy support. Is
there a particular reason that I should not use the older one? And is
there any chance for IGameEvent to be expanded to allow for iteration
of the event's params/arguments because I would like to use the newer
interface, but it doesn't provide everything I need at the moment.
___
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