Raised This Month: $ Target: $400
 0% 

Request Matrix event script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Moe_FuGGeR
New Member
Join Date: Dec 2004
Old 06-14-2005 , 17:37   Request Matrix event script
Reply With Quote #1

Well I'm no coder and i spent a little time going through other event scripts but i have no clue.Currently on my server i have a key bound to activate what is called matrix mode which basically changes phys_pushscale/phys_timescale so that when someone is shot they fly backwards in slow motion.
So here's what I'm wondering,if someone if it's possible to write me an eventscript so that matrix mode is activated by a headshot and only stays on for like 2-3 seconds then goes back to normal

Matrix mode settings = phys_pushscale 15 phys_timescale .2
My normal server settings = phys_pushscale 3 phys_timescale 1

Thx in advanced to anyone willing to help me.
Moe_FuGGeR is offline
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 06-14-2005 , 18:21  
Reply With Quote #2

Good idea. This should work.
server.cfg
Quote:
setinfo matricks_pushscale 15
setinfo matricks_timescale 0.2
setinfo matricks_duration 3
player_death.cfg
Quote:
if (event_var(headshot) equalto 1) then phys_pushscale server_var(matricks_pushscale)
if (event_var(headshot) equalto 1) then phys_timescale server_var(matricks_timescale)
if (event_var(headshot) equalto 1) then es_xdelayed server_var(matricks_duration) phys_pushscale server_var(matricks_pushscale)
if (event_var(headshot) equalto 1) then es_xdelayed server_var(matricks_duration) phys_timescale server_var(matricks_timescale)
Only potential problem with this is that it might go a little funky when there are multiple headshots within a 3 second period.
__________________
ichthys is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 06-14-2005 , 18:22   Re: Request Matrix event script
Reply With Quote #3

Quote:
Originally Posted by Moe_FuGGeR
Well I'm no coder and i spent a little time going through other event scripts but i have no clue.Currently on my server i have a key bound to activate what is called matrix mode which basically changes phys_pushscale/phys_timescale so that when someone is shot they fly backwards in slow motion.
So here's what I'm wondering,if someone if it's possible to write me an eventscript so that matrix mode is activated by a headshot and only stays on for like 2-3 seconds then goes back to normal

Matrix mode settings = phys_pushscale 15 phys_timescale .2
My normal server settings = phys_pushscale 3 phys_timescale 1

Thx in advanced to anyone willing to help me.
Neat-- try this:

server.cfg:
Code:
// set this to the number of seconds each headshot should
// increase the matrix effect
es_xsetinfo matrixlength 2
// just initialize this fellow for later user
es_xsetinfo matrixtime 0

// here are all the aliases
alias matrix_on "phys_timescale .2;phys_pushscale 15"
alias matrix_off "phys_timescale 1;phys_pushscale 3"
alias start_matrix "ma_play matrixsound.wav;matrix_on;es_math matrixtime + server_var(matrixlength);es_delayed 1 check_matrix"
alias dec_matrix "es_xmath matrixtime - 1;es_delayed 1 check_matrix"
alias check_matrix "if (server_var(matrixtime) greaterthan 0) then dec_matrix; if (server_var(matrixtime) lessthan 1) then matrix_off"
player_death.cfg:
Code:
if (event_var(headshot) equalto 1) then if (server_var(matrixtime) lessthan 1) then start_matrix
I have a feeling you're going to see lots of spam of "server changed variable". That might go away if you used "es_xsetinfo phys_timescale .2" instead of the direct variable setting I do above.

I haven't tested this, but it's trying to convey the best way I can think of to handle it to prevent the Matrix effect from stopping earlier than you'd expect when people get a lot of headshots in a row.

Oh, I added a little Matrix sound in there (ma_play matrixsound.wav)-- feel free to remove it. I just thought it'd be kinda neat, though I have no such sound. ;) (It'll only trigger on the first headshot fired in a row.)

Good luck-- if any of the other script writers have a taken on this, I'd be interested to see it.
-Mattie
Mattie is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 06-14-2005 , 18:53  
Reply With Quote #4

I played with this a little on my server, and it doesn't seem that the players get the variable info in time for the body to fly correctly (as rendered on the client). The timing just doesn't feel right =/

When I wanted a similar plugin a long time ago, I actually wanted the server to pause, all spectators to move to the player who did the killing, follow the killer's gun to the victim, and unpause his death in slow motion.

I don't think EventScripts can do that. ;) (Consider that a challenge to other script writers.)
-Mattie
Mattie is offline
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 06-14-2005 , 21:36  
Reply With Quote #5

Quote:
Originally Posted by Mattie
I played with this a little on my server, and it doesn't seem that the players get the variable info in time for the body to fly correctly (as rendered on the client). The timing just doesn't feel right =/

When I wanted a similar plugin a long time ago, I actually wanted the server to pause, all spectators to move to the player who did the killing, follow the killer's gun to the victim, and unpause his death in slow motion.

I don't think EventScripts can do that. ;) (Consider that a challenge to other script writers.)
-Mattie
oooo...
__________________
ichthys is offline
putnani
Member
Join Date: Mar 2005
Old 06-14-2005 , 21:46  
Reply With Quote #6

can some one make an scripts pack of this or upload the files ?

want to try it out but iam noob at making own files dont understand 100% some times
putnani is offline
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 06-14-2005 , 22:12  
Reply With Quote #7

I think Mattie said that the timing wasnt right for the effect to work?

Just make the files that either Mattie or I have given code for then upload them to your events directory. If you already have those files then you'll want to add those lines somewhere at the bottom or wherever.
__________________
ichthys is offline
Moe_FuGGeR
New Member
Join Date: Dec 2004
Old 06-16-2005 , 16:52  
Reply With Quote #8

Well i appreciate the attempt and im sorry to hear that it's not going to work,I will continue to check in here to see if anyone comes up with a solution to get this to work.
thx again.
Moe_FuGGeR is offline
putnani
Member
Join Date: Mar 2005
Old 06-16-2005 , 17:33  
Reply With Quote #9

is it possible to make matrix take effect after 3 hs when u make the fourth hs the matrix takes effect
putnani is offline
awuh0
Senior Member
Join Date: Apr 2005
Location: /dev/null
Old 06-16-2005 , 17:55  
Reply With Quote #10

Quote:
Originally Posted by Mattie
I played with this a little on my server, and it doesn't seem that the players get the variable info in time for the body to fly correctly (as rendered on the client). The timing just doesn't feel right =/

When I wanted a similar plugin a long time ago, I actually wanted the server to pause, all spectators to move to the player who did the killing, follow the killer's gun to the victim, and unpause his death in slow motion.

I don't think EventScripts can do that. ;) (Consider that a challenge to other script writers.)
-Mattie
you can make all players spectate a player with nemod
nm_exec #all nm_spec killername

would do a bit of spaming for players who are alive as they cant spectate while living, dont know about following bullets lol...

you could trigger the timescale on player_hurt with an es_delayed to put it back to normal for more of a max payne effect but it would do the physics correctly within the es_delayed time...
__________________
~The_wUh
_________________
Ph34r teh zombies!!!
find a better way to play CSS, connect to...
thewuh.servebeer.com
thecircus.servebeer.com
awuh0 is offline
Send a message via ICQ to awuh0 Send a message via AIM to awuh0 Send a message via MSN to awuh0
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 16:27.


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