|
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
|
10-17-2006 13:04
I have a script that tracks health, and takes bullet damage. I want to be able to take damage form melee weaps, i know RCS you will only take damage if the other person is wearing a RCS, and ANY melee weapon works with the system?
I was theoriseing about a sensor that goes off to detect a nother person close and doing an action. And the attacker on hit transmits on a challen saying Hey you yoube been hit take damage.
BUt how do i determin if the person is attacking with a melee? I cant put a object in their hand. The system is attached to their chest.
I register bullets with Collisions and velocity.
_____________________
LSL Scripting Database - http://lsl.dimentox.com
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
10-17-2006 13:06
From: Dimentox Travanti I have a script that tracks health, and takes bullet damage. I want to be able to take damage form melee weaps, i know RCS you will only take damage if the other person is wearing a RCS, and ANY melee weapon works with the system?
I was theoriseing about a sensor that goes off to detect a nother person close and doing an action.
BUt how do i determin if the person is attacking with a melee? RCS translates push data into damage for "any" melee weapon. you will notice that if you are in a push-restricted area, RCS melee will only register melee scripted specifically for RCS.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
|
10-17-2006 13:45
I think this was changed with version C which works in push restricted. And will ONLY work if the other person is wearing C.
We had one person stand there with RCS 6.0c on and the attacker with rcs on. It did damage. The attacker took off RCS and the blades no longer damaged.
_____________________
LSL Scripting Database - http://lsl.dimentox.com
|
|
Lazarus Wake
Registered User
Join date: 9 Jan 2006
Posts: 33
|
10-17-2006 14:14
I spoke with Neilani Valentine a little while back to ask him how the RCS worked so I could make weapons that were compatible with it.
According to what I recall when an object collides with the avatar at greater than a certain speed the player takes 5% damage. This is how bullets are generally handled. Push data is not used. I know this because I use a Redeemer set to no push.
The other way that damage occurs is when one person with an RCS is standing close to another and holds down their left mouse button and hits a movement key. This does 2% damage to the recipient and is how melee attacks are generally handled.
My assumption is that the RCS captures the control keys via llTakeControls with pass_on set to TRUE. When it detects the player holding down the left mouse button and hitting a movement key it does a sensor check and if there's players in the arc and within range it broadcasts a message that says something to the effect of 'got you player <x>' on some channel. When the other player's RCS hears this it reduces their health by 2%.
Of course this means that there are 'gaps' in the weapons that work. If you devise a melee weapon that is HUD activated then it probably won't work, unless the melee weapon fires a very short range 'bullet' for handling contact.
Since SL is a completely open framework I don't think you can ever totally guarantee that every weapon will work with a given combat system. People might make push guns that just use a sensor and no bullet or melee weapons that are controlled through a HUD or gestures, but by detecting collisions with the avatar and capturing left mouse and movement keys probably 95% of the weapons out there will work.
|
|
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
|
10-18-2006 06:43
Thanks, I appreciate this info.
_____________________
LSL Scripting Database - http://lsl.dimentox.com
|