You are here

Modern d20 (2.1) : how to add onHit knockdown to bullets?

6 posts / 0 new
Last post
paphjort
Modern d20 (2.1) : how to add onHit knockdown to bullets?

Hi 

I'm trying to add the ability to some guns, so that the target is knocked down. 

How can I do that in the modern d20 system? Unique power? 

On bullets or gun? 

Just making these bullets/guns fire a script onHit is also fine, then I can script the rest.

 

Any help is appreciated, the modern d20 gun system is a bit difficult to understand...

I'm using the newest version (2.1)

Cheers, Pap

  • up
    50%
  • down
    50%
Vanya Mia

That property is not in the item property options for D20 Modern, not least as the feat is used as a class related ability for some of the PC classes. If you really want to do it you can either change the itemprops 2dA yourself and drop that in a top level hak, or code it from a scripted on hit event.

I'm curious as to what you want to represent by doing this though.

Also if you need any help with the gun systems then ask as yes they are, of necessity, complicated.

"I took Skill Focus: Craft Disturbing Mental Image as my feat last level." Belkar, OOTS

  • up
    100%
  • down
    0%
paphjort

Hi Vanya, thx for your answer.

I'm making a multi-player mod, where I want to give a high-caliber rifle the property of knocking down the target when hit.  I'm thinking it should be an ability of the weapon/bullet and not the PC, as it is tied to that specifik type of weapon. (therefore not using the knockdown-feat, which also only works for melee weapons right?)

since I wrote the first post, I've changed it, so that only targets below a certain size gets knocked down, so I guess its better with an OnHit event.

That means the unique power, right?

Do you know if that goes on the bullets or on the gun?.

I can of course do a check everytime the applicable opponents are hit (via a script on them), to see which gun the attacker is holding, but the other solution seems better. 

A script also makes it easier to add a probability etc. if necessary.

Thanks, Pap

 

  • up
    50%
  • down
    50%
Vanya Mia

Never done this with a ranged weapon, so I am not a hundred percent certain, but I think the on_hit goes on the gun. It seems the most likely place as I think the actual hit is calculated from that point and damage on the ammunition is added in. To be honest the best thing is probably to try by just writing a simple script to send a shout out if it triggers.

Sounds a neat consideration though. It should mean something if you're hit by a 50 cal? :D

  • up
    100%
  • down
    0%
paphjort

Vanya, just wanted to let you know that I succeeded by putting 

"On Hit Cast Spell : Unique power (onHit)"

On the magazine instead of

"On Hit Cast Spell : Modern Damage System"

and then make the following script with the tag of the magazine:

/*
    Round from a rifle that causes knockdown on the target.
*/
 
void main()
{
    //Declare major variables
    object oShotTarget = GetSpellTargetObject();
    int nDamage;
    float fDelay;
    int iDur = Random(5)+5;
    float fDur = IntToFloat(iDur);
    effect eKnock = EffectKnockdown();
    effect eDam; // Not used
 
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oShotTarget,fDur);
 
    // Execute normal damage system afterwards
 
    ExecuteScript("_mdrn_condrop", OBJECT_SELF);

}

 

:-)

Pap 

 

  • up
    100%
  • down
    0%
Vanya Mia

Thanks for the prompt. I have recently run across an issue of not being able to use additional on-hit-cast property onto weapons at all, something that only just became an issue for me because of running Rogue Trader.

Been looking into whether spell hooking would work to call the Modern Damage so the _mdrn_condrop can be initiated after a regular on-hit-cast but I'm not sure if the spell hook script is initiated by the property and haven't yet had a chance to correct it. It's limiting in it's current set up and does need changing but I need to find a way that encompasses all on-hit properties without rewriting all of them!

  • up
    50%
  • down
    50%