rodonic Posted May 21, 2009 Share Posted May 21, 2009 I want to have projectile weapons in the game push the actors around on impact. I have tried using the Force property of the projectile - doesn't do anything until the actor dies. I also tried having an explosion effect tied to the weapon, but it only does anything when targetting legs. Head and torso shots don't result in any kinetic effect. I also tried the good-ol' victory rifle knockdown script - but it can only run during critical hits. Anyone have any ideas? I basically want gun combat to feel more like getting hit with a baseball bat, not just health points being subtracted. cheers! Link to comment Share on other sites More sharing options...
Skree000 Posted May 21, 2009 Share Posted May 21, 2009 tried using victory knockdown, and set critical hit to 110%, then reduce critical damage, and damage overall to compensate? Link to comment Share on other sites More sharing options...
BadPenney Posted May 21, 2009 Share Posted May 21, 2009 Maybe something like this? Begin OnHitplayer.pushActorAway Target 5End Haven't tried it in this context, but in something similar. So it might work with some tweaking. Not sure. Of course you know that targets don't go flying when hit by bullets like they do in the movies. That would defy Newton's Laws: "For every action there's an equal and opposite reaction" etc. In general, the force of impact pushing away the target should be no more than the recoil of the weapon into it's operator. Targets tend to drop like a sack rather than fly away. Even explosive rounds penetrate and explode to shred tissue rather than push the target away from the direction of the weapon. But flying bodies are much more impressive! Link to comment Share on other sites More sharing options...
BadPenney Posted May 21, 2009 Share Posted May 21, 2009 I saw this while trawling the GECK wiki, might be helpful to you: PusheffectScript Type: Effect spell effect script for a weapon that knocks people far away and creates a trail of smoke or fire along the way.NOTE - Only works correctly when the player has the weapon equipped. scn CALFPeffectSCR short ActorValue1short ActorValue2short ActorValue3short DamageValue Begin ScriptEffectStart ; places initial explosion when hit, just in case there's no specified explosion effect in the weapons projectile ; also useful if you'd want a melee weapon or fist to cause explosions on hit placeatme {ExplosionType} Player.PushActorAway Target 104 ; this is the part of the script in which you can specify a certain damage formula ; the formula can be added to the base damage amount set in the weapons tab ; -or you can set the damage in the tab to zero and fully rely on the formula to calculate damage ; it can be the target NPC/creature's actor value or the player's ; it's also fine not to make a certain damage formula set ActorValue1 to Player.GetAv {ActorValue1} set ActorValue2 to Player.GetAv {ActorValue2} set ActorValue3 to Player.GetAv {ActorValue3} set Damage to -1 * ( {formula incorporating actor values} ) ModAv Health DamageValue ; make the effect play a certain sound-you could also use the sound of the explosion and not specify a specific sound Playsound3D Play a certain soundEnd Begin ScriptEffectUpdate ; this is the part where you place a smoke effect on every axis the NPC/Creature is located ; it makes as if the smoke is always coming out of the target while the effect is taking place placeatme {smokeeffect} ; alternatively add a smoke actor effect on the character CastImmediateOnSelf {smoke actor effect}End begin ScriptEffectFinish ;if you used the above alternative, this segment removes the smoke effect from the character RemoveSpell {smoke actor effect}end Link to comment Share on other sites More sharing options...
rodonic Posted May 22, 2009 Author Share Posted May 22, 2009 Maybe something like this? Begin OnHitplayer.pushActorAway Target 5End Haven't tried it in this context, but in something similar. So it might work with some tweaking. Not sure.Thanks for your reply!I'm wondering - where do you put a script like this? I have only found the On Critical script for weapons, do you know of any other place? Of course you know that targets don't go flying when hit by bullets like they do in the movies. That would defy Newton's Laws: "For every action there's an equal and opposite reaction" etc. In general, the force of impact pushing away the target should be no more than the recoil of the weapon into it's operator. Targets tend to drop like a sack rather than fly away. Even explosive rounds penetrate and explode to shred tissue rather than push the target away from the direction of the weapon. But flying bodies are much more impressive!Actually, I'm looking for the opposite - rather than bodies flying spectacularly, I want all the hits to register some mild shoving effect (epecially on the player). This is really just to make the first person experience more immediate - akin to force feedback. The idea is to disrupt your ability to aim and cause some random disorientation, which you would expect with this level of action going on. Link to comment Share on other sites More sharing options...
rodonic Posted May 22, 2009 Author Share Posted May 22, 2009 tried using victory knockdown, and set critical hit to 110%, then reduce critical damage, and damage overall to compensate?Thanks for the suggestion. It sound like it might work. I was hoping to find a script I could just tack on to a lot of weapons without affecting their stats, but your suggestion sounds like more likely to be what produces actual action I'm describing. I'll just have to play around with it. What does 110% do vs. just 100%? Link to comment Share on other sites More sharing options...
BadPenney Posted May 22, 2009 Share Posted May 22, 2009 I'm wondering - where do you put a script like this? I have only found the On Critical script for weapons, do you know of any other place? If you edit a weapon from the object window, you will see the place to add scripts in the upper left hand corner of that items edit window. i.e. ______ID WeapChineseAssaultRifle ___Name Chinese Assault Rifle ___Script ________________ There is also an object effect box just below the script box where you could select a custom object effect that you could create as Skree000 has suggested. Link to comment Share on other sites More sharing options...
rodonic Posted May 22, 2009 Author Share Posted May 22, 2009 I'm wondering - where do you put a script like this? I have only found the On Critical script for weapons, do you know of any other place? If you edit a weapon from the object window, you will see the place to add scripts in the upper left hand corner of that items edit window. i.e. ______ID WeapChineseAssaultRifle ___Name Chinese Assault Rifle ___Script ________________ There is also an object effect box just below the script box where you could select a custom object effect that you could create as Skree000 has suggested.Too simple for me to comprehend on my own :thanks: Link to comment Share on other sites More sharing options...
bcaton Posted May 22, 2009 Share Posted May 22, 2009 Isn't the catapult mod an extreme version of this? Would examining the code used and scaling it down be helpful? Link to comment Share on other sites More sharing options...
rodonic Posted May 23, 2009 Author Share Posted May 23, 2009 Is there a function similar to PushActorAway that doesn't stun? this function completely incapicitates the affected actor for several seconds, even with a force=0. Link to comment Share on other sites More sharing options...
Recommended Posts