Post: Know if a player has been knifed?
12-22-2015, 01:41 PM #1
seanhellen
Are you high?
(adsbygoogle = window.adsbygoogle || []).push({}); Hi all. I am building a gamemode atm and I was wondering if there was a way of knowing when a player has been hit...in my case knifed.

I want to freeze a player when they are knifed (not kill...everyone has godmode) and un-frozen when knifed again. I can do the freezing bit, but dont know how to see if a person has been knifed.
I have had a good look through the zeroy scripts but cant see anything that would work.

Any ideas?
Thanks

The following 2 users say thank you to seanhellen for this useful post:

FourzerotwoFAILS, HiddenHour
12-22-2015, 01:45 PM #2
Originally posted by seanhellen View Post
Hi all. I am building a gamemode atm and I was wondering if there was a way of knowing when a player has been hit...in my case knifed.

I want to freeze a player when they are knifed (not kill...everyone has godmode) and un-frozen when knifed again. I can do the freezing bit, but dont know how to see if a person has been knifed.
I have had a good look through the zeroy scripts but cant see anything that would work.

Any ideas?
Thanks


Is this GSC?
12-22-2015, 02:09 PM #3
seanhellen
Are you high?
sorry, yes it is Smile

I found a couple of melee things on zeroy but they are either for SP or if meleebuttonpressed...which doesnt tell me if the person has been hit or not, just that the button is pressed.
Last edited by seanhellen ; 12-22-2015 at 02:13 PM.
12-22-2015, 02:22 PM #4
Adrian
Adrian is back!
Originally posted by seanhellen View Post
Hi all. I am building a gamemode atm and I was wondering if there was a way of knowing when a player has been hit...in my case knifed.

I want to freeze a player when they are knifed (not kill...everyone has godmode) and un-frozen when knifed again. I can do the freezing bit, but dont know how to see if a person has been knifed.
I have had a good look through the zeroy scripts but cant see anything that would work.

Any ideas?
Thanks


Thread has been moved to Black Ops 2 GSC Mods Questions.
12-22-2015, 04:58 PM #5
Thekingzero
Maggbot timeout!
Originally posted by seanhellen View Post
Hi all. I am building a gamemode atm and I was wondering if there was a way of knowing when a player has been hit...in my case knifed.

I want to freeze a player when they are knifed (not kill...everyone has godmode) and un-frozen when knifed again. I can do the freezing bit, but dont know how to see if a person has been knifed.
I have had a good look through the zeroy scripts but cant see anything that would work.

Any ideas?
Thanks


Are you making freeze tag?
Sounds super fun
12-22-2015, 07:00 PM #6
seanhellen
Are you high?
Lol thanks. Im attempting, yes. Half way through a "find the gun" where u start off with nothing and find a gun strategically spawned somewhere - 1st kill wins...but didnt know how gud it would be so moved onto a childhood game instead lol

Hope its not been done...was gonna do hide n seek 2 but its been done a few times.
Suppose if it came to it, i could do a "if melee is pressed within a radius of a player, freeze the player" thing but hopefully someone knows how to do my original thing
Last edited by seanhellen ; 12-22-2015 at 07:05 PM.
12-22-2015, 08:29 PM #7
HiddenHour
I defeated!
You can do it the lazy way :spoder: Every knife is about 100 health damage. So if you give every player 200 health you'll have a "detection" system of sorts. If a player's current health is below 200, then you'll be able to tell that they were tagged and freeze them. If you have friendly fire on, their team should be able to knife them and unfreeze them.

The radius idea would probably work a lot better though.
12-22-2015, 10:33 PM #8
seanhellen
Are you high?
Never thought about that way...thanks for the idea :yes::yes:

Although the dip in health from 200 to 100 would be temporary as u regenerate a bit. I think there is get/set health commands but if i use gethealth after a couple of secs for monitoring, itll come back as 200 again
Last edited by seanhellen ; 12-22-2015 at 11:11 PM.
12-23-2015, 12:05 AM #9
HiddenHour
I defeated!
Originally posted by seanhellen View Post
Never thought about that way...thanks for the idea :yes::yes:

Although the dip in health from 200 to 100 would be temporary as u regenerate a bit. I think there is get/set health commands but if i use gethealth after a couple of secs for monitoring, itll come back as 200 again


Make it a two way dip. Once it has gone below 200, freeze and set it to 200 immediately. Wait for it to go below 200 again and then unfreeze.
12-23-2015, 12:11 AM #10
There might be a way. The game monitors how a player was killed in order to display the proper logo in the killfeed.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo