• Possible to get player damage pos
    11 replies, posted
Im currently constructing a bullet simulator in real life its pretty much a muscle stimulator circuit with shock pads attached to my body that will shock me depending on the players damage position what i want to know is can i get the postion on the body a player is shot i figured perhaps something with bones would be possible?
First reaction: "Wut" Second reaction: "Holy shit if this guy actually makes this I need to find him ingame and shoot the crap out of him" Third reaction: You could probably use bones, yes. I don't want to suggest a method, since the only ideas I can come up with are kinda hacky, but you could probably have some serverside script detect where you were hit, and have it send the shock data back to your client.
Haha its a pretty simple design gonna be fun to test out! Yea i thought about using net messages to send the hit bone only problem with that is would only work on servers running the script wich is less than ideal
How are you planning on communicating between Lua and the shockpads? Most servers don't have clientside Lua enabled ( besides some DarkRP ones ), so even if you did find a way to figure out where you were shot you wouldn't be able run the scripts anyway. Unless you feel like forcing sv_allowcslua, which would be "cheating" in most cases. Also, please put them on your face.
To be honest i didnt really care about other servers it was mearly the fact that using net messages is not the best way i wanted to do it all clientside to make it more reliable. Mehh done that before just makes you smile.
According to the wiki, it is still shared, so you'd probably want to use [code]GAMEMODE:PlayerTraceAttack( pl, info, dir, tr )[/code] You would need to localize tr.HitPos and figure out where on your circuit it would be.
On another note, I'd be willing to help you with this if you want. I do a lot of C++ stuff and have experience with microcontrollers, which is what you would need to get your lua script to make your shock pads shock you.
Im working with the ATMEGA323 and have already created a binary module for garrysmod to comunicate with it via serail once its tested and completed ill probably use xbee modules to comuincate with it.
I just thought of an idea for you. I'm going to assume that your are only going to use them on the front, but what if instead you used 1 front and one back. You could then get the hitpos local to the bone it hit and shock you depending on where you are hit, (front of leg or back of leg) then you know if you are being shot from behind. Also this idea is shocking ;D
-snip, I'm a tard-
[QUOTE=Pandaman09;40436252]I just thought of an idea for you. I'm going to assume that your are only going to use them on the front, but what if instead you used 1 front and one back. You could then get the hitpos local to the bone it hit and shock you depending on where you are hit, (front of leg or back of leg) then you know if you are being shot from behind. Also this idea is shocking ;D[/QUOTE] That was the idea im using around 8 pads but theres places on the human body thats not really safe to shock such as neck etc. Ahah i like the pun
You could do up-er back for the head, like right about shoulder blades?
Sorry, you need to Log In to post a reply to this thread.