Raised This Month: $ Target: $400
 0% 

messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ramirez
Member
Join Date: Aug 2004
Old 09-26-2004 , 14:12   messages
Reply With Quote #1

Alright, I just cant understand messages...
I went through the whole temp messages doc in SDK...
I checked out some plugins..
BUt I jsut cant undersatand how it works..
I really wanna do messages but I need someone to help me understand..
Could anyone kindly explain me?
Ramirez is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-26-2004 , 15:52  
Reply With Quote #2

well there's many different messages you can apply to...
the following makes their screen a certain color(red in this case)
Code:
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)     write_short( 15 )     write_short( 15 )     write_short( 12 )     write_byte( 200 ) // red     write_byte( 0 ) // green     write_byte( 0 ) // blue     write_byte( 200 ) // alpha     message_end()
Notice it has get_user_msgid("ScreenFade") so it uses the screenfade message to apply the color. The following is a screenflash...
Code:
    message_begin(MSG_ONE, get_user_msgid("ScreenShake"),{0,0,0},id)     write_short( 1<<3 )// amplitude     write_short( 1<<3 )// duration     write_short( 1<<3 )// frequency     message_end()
also see the ScreenShake message... notice that the last parameter of message_begin() is who it applies to so make sure you set it to ur needs There are many others but i hope this gives some understandment....
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Ramirez
Member
Join Date: Aug 2004
Old 09-26-2004 , 16:05  
Reply With Quote #3

Yeah, alrdy helps a little..
but could you explain further on how it works?
Like,


Code:
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
How do you know that u have to put "MSG_ONE"
And what are the "{0,0,0}" for?
What is the difference between:
Code:
write_short( 15 )
and
Code:
write_byte ( 15 )
And why "15" where do you take that number?.

Also,
Code:
write_short( 1<<3 )// amplitude
How does this 1<<3 works?
not sure what it does...
Any help would be really appreciated
Ramirez is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-26-2004 , 16:08  
Reply With Quote #4

maybe u might want to learn what short/bytes and bitwise operators are.
Also checking the include files might help..........ALOT
Freecode is offline
Ramirez
Member
Join Date: Aug 2004
Old 09-26-2004 , 16:09  
Reply With Quote #5

Quote:
Originally Posted by Freecode
maybe u might want to learn what short/bytes and bitwise operators are.
Also checking the include files might help..........ALOT
Alright, ill check it out...
Ramirez is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-26-2004 , 16:17  
Reply With Quote #6

Quote:
Originally Posted by Ramirez
Also,
Code:
write_short( 1<<3 )// amplitude
How does this 1<<3 works?
not sure what it does...
Any help would be really appreciated
Code:
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},index)     write_short( 1<<decisecs ) // fade lasts this long duration     write_short( 1<<decisecs ) // fade lasts this long hold time     write_short( 1<<12 ) // fade type (in / out)     write_byte( red ) // fade red     write_byte( green ) // fade green     write_byte( blue ) // fade blue     write_byte( alpha ) // fade alpha     message_end()
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Ramirez
Member
Join Date: Aug 2004
Old 09-26-2004 , 16:19  
Reply With Quote #7

Another question
In the: get_user_msgid()
Where can I find a list of all the messages?
and is there any other way then "get_user_msgid" to get different effects?
And I just can't get the write_short thingie..
How do you know what number to write? o_O
Ramirez is offline
Ramirez
Member
Join Date: Aug 2004
Old 09-26-2004 , 21:56  
Reply With Quote #8

IS there a tutorial available somewhere?
Ramirez is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-26-2004 , 21:58  
Reply With Quote #9

meta game << type that in console to get list of all mods events/messages
Freecode is offline
Ramirez
Member
Join Date: Aug 2004
Old 09-27-2004 , 16:31  
Reply With Quote #10

OK, thanks for the info..
Now I wanna know... How would I go if I wanted to do some effects... like...
You know fireworks, fire etc...
How do they do it?
msg_one too?
Ramirez is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode