Re: [hlcoders] 2 quick questions

2005-03-05 Thread Erik K
Thank you! ;)


On Fri, 4 Mar 2005 10:05:15 -0800, Yahn Bernier
[EMAIL PROTECTED] wrote:
 Use:

 CBroadcastRecipientFilter filter;

 Instead of CSingleUserRecipientFilter

 (there are other convenient filters in recipientfilter.h)

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Erik K
 Sent: Friday, March 04, 2005 3:38 AM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] 2 quick questions

 There are 2 things i'm trying to accomplish at the moment.

 First I would like to know how to play a sound on all players. Right now
 I use the following code to play a sound when a player captures a
 flag:

 EmitSound( Flag.Captured );

 but that only plays the sound on the client if he's close enough to the
 captured flag. How do I play a sound on all players, no mather how far
 they are away from a captured flag?

 Second thing is how to send a UserMessage to all clients. I only know
 how to send one to one particular player:

 CSingleUserRecipientFilter filter ( this ); // set recipient
 filter.MakeReliable(); // reliable transmission

 UserMessageBegin( filter, MyMessage ); // create message WRITE_BYTE( 1
 ); // fill message WRITE_BYTE( 0 ); // fill message MessageEnd(); //send
 message

 What do I need to do to send it to all connected players?

 Thanks in advance,

 Erikk

 ___
 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



[hlcoders] 2 quick questions

2005-03-04 Thread Erik K
There are 2 things i'm trying to accomplish at the moment.

First I would like to know how to play a sound on all players. Right
now I use the following code to play a sound when a player captures a
flag:

EmitSound( Flag.Captured );

but that only plays the sound on the client if he's close enough to
the captured flag. How do I play a sound on all players, no mather how
far they are away from a captured flag?

Second thing is how to send a UserMessage to all clients. I only know
how to send one to one particular player:

CSingleUserRecipientFilter filter ( this ); // set recipient
filter.MakeReliable(); // reliable transmission

UserMessageBegin( filter, MyMessage ); // create message
WRITE_BYTE( 1 ); // fill message
WRITE_BYTE( 0 ); // fill message
MessageEnd(); //send message

What do I need to do to send it to all connected players?

Thanks in advance,


Erikk

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



Re: [hlcoders] 2 quick questions

2005-03-04 Thread Erik K
Oops ;)

That's HL2 i'm working on ;)


On Fri, 4 Mar 2005 03:46:49 -0800 (PST), Adam amckern Mckern
[EMAIL PROTECTED] wrote:
 emit sound pPlayer - i dont know if your source, or
 hl1
 ^ that is hl 1

 as for second, take a look at hudmesage cvar (mappers
 cvar)

 --- Erik K [EMAIL PROTECTED] wrote:
  There are 2 things i'm trying to accomplish at the
  moment.
 
  First I would like to know how to play a sound on
  all players. Right
  now I use the following code to play a sound when a
  player captures a
  flag:
 
  EmitSound( Flag.Captured );
 
  but that only plays the sound on the client if he's
  close enough to
  the captured flag. How do I play a sound on all
  players, no mather how
  far they are away from a captured flag?
 
  Second thing is how to send a UserMessage to all
  clients. I only know
  how to send one to one particular player:
 
  CSingleUserRecipientFilter filter ( this ); // set
  recipient
  filter.MakeReliable(); // reliable transmission
 
  UserMessageBegin( filter, MyMessage ); // create
  message
  WRITE_BYTE( 1 ); // fill message
  WRITE_BYTE( 0 ); // fill message
  MessageEnd(); //send message
 
  What do I need to do to send it to all connected
  players?
 
  Thanks in advance,
 
 
  Erikk
 
  ___
  To unsubscribe, edit your list preferences, or view
  the list archives, please visit:
 
 http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

 http://ammahls.com

 __
 Celebrate Yahoo!'s 10th Birthday!
 Yahoo! Netrospective: 100 Moments of the Web
 http://birthday.yahoo.com/netrospective/

 ___
 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



[hlcoders] How to play model animations in-game

2005-02-28 Thread Erik K
I've moddeled and animated a flag model for a ctf game mode in my mod.
The flag has a simple wave idle animation. When I view my model in
HLMV, the animation plays as it should.

Next i've coded a new entity, added it to my fgd file and placed the
flag it in my map. In-game, the model is visible, but the idle
animation won't show.

Now I know that I probably have to code something in my new entity cpp
file, so the idle animation will show in-game. I've searched through
the sdk, but I can't seem to figure out how Source handles animations.

Can someone please try to explain to me how to setup the code so it
will play the animation in-game?

Thanks in advance, 


Erikk

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