|
KeeperS Karu
Registered User
Join date: 18 Oct 2008
Posts: 31
|
11-11-2008 22:06
Heyla!
I've got another scripting question. I've been looking around the forums and web sites to see what information I can get about how to go about scripting a sword/melee block. Basically, what I'm after is a method that allows me to do the following: when I press certain keys, the blocking animation is played, and while those keys are pressed, the avatar takes no damage from another's melee weapon.
Now, I'm not sure if this is an effective or even efficient way of going about this, but after coming across the idea of shields, I was thinking that maybe somehow finding a way to create a physical shield to keep the attacker from getting within a certain range of an avatar might be a good way to go about this? (This idea was inspired when I noticed that the open source LCK script seemed to work by checking if a valid target was within a certain range of the attacker. If the attacker was prevented from getting within that range, then she would effectively be blocked from causing damage.) It would have to be a shield that, when the blocking keys are pressed, is rezzed about or in front of the avatar, then, when the blocking keys are released, is deleted. Is this a good idea? Is it even possible? Did I misunderstand how shields work, and they don't block avatar progress?
More importantly, am I being too complicated, and there's an easier way to go about preventing damage from being dealt to a blocking avatar?
Thanks for your help! Keeper S. Karu
|
|
Faust Vollmar
llSetAgentSanity(FALSE);
Join date: 3 Feb 2007
Posts: 87
|
11-11-2008 22:59
Without modifying the combat meter in question yes, a rezzed shield is the only way to do this. However theres 2 problems. First being that Shields are often disallowed, in any form, from Sims using these meters and Second being that if they're already close it won't do any good.
If I recall correctly, though, most combat meters have a block function, usually triggered with the pgdn / c key.
|
|
KeeperS Karu
Registered User
Join date: 18 Oct 2008
Posts: 31
|
11-11-2008 23:24
From: Faust Vollmar Without modifying the combat meter in question yes, a rezzed shield is the only way to do this. However theres 2 problems. First being that Shields are often disallowed, in any form, from Sims using these meters and Second being that if they're already close it won't do any good.
If I recall correctly, though, most combat meters have a block function, usually triggered with the pgdn / c key. Oh, those are two good problems with using the shield method. However, if you're correct about the meters, it's something I don't need to worry about, anyhow, as these meters already have the codes necessary to calculate how a block works? Well, that certainly makes things much easier for me, then, as now all I need to worry about are ensuring that the animations and sound effects synch up as properly as I can manage. Thank you for this info! Keeper S. Karu
|