PushActorAway

Post » Tue May 17, 2011 2:23 am

does http://geck.gamesas.com/index.php/PushActorAway when used as a weapon effect do anything other than knock an NPC on his ass? I see that the Gauss rifle has a higher value than the victory rifle, for example (10 vs 5)... which would imply the target gets knocked back further, but in testing I raised this setting. first tried 20, then 50, then 500, then 5000 and see no difference at all. If that value doesn't actually apply any more force to the NPC, is there another way to do so? maybe with an explosion? any way to apply such a method to a melee weapon (like a super sledge to toss an NPC a decent distance)?
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am

Post » Tue May 17, 2011 1:32 pm

The victory rifle knock down effect uses a script where the pushactoraway command set set to use a force of 5. Where were you changing these values of 20, 50, 500, 5000? If you want a greater push effect, you would need to make a new effect script.

You could try to make your weapon use a custom projectile that has a very high impact force.
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Mon May 16, 2011 11:23 pm

Interesting to hear, it sounds like the force might top out at 10. I'm using the command for an area of effect stun gun that knocks back anyone standing too near the player, and when I boosted up the force via randomness and a stat check, they really didn't seem to fly much farther.
User avatar
Emily Rose
 
Posts: 3482
Joined: Sat Feb 17, 2007 5:56 pm

Post » Tue May 17, 2011 1:35 pm

I've played with http://geck.gamesas.com/index.php/PushActorAway in the console, and I can confirm that the force does not top out at 10. Try making an actor push themselves away with a large force (try 200, for example) and you'll see just how fast they're pushed off the ground. Keep in mind that if the actor is being pushed toward the ground, an increase in force will not be as obvious.

Cipscis
User avatar
Stephanie Kemp
 
Posts: 3329
Joined: Sun Jun 25, 2006 12:39 am

Post » Tue May 17, 2011 1:28 am

I've played with http://geck.gamesas.com/index.php/PushActorAway in the console, and I can confirm that the force does not top out at 10. Try making an actor push themselves away with a large force (try 200, for example) and you'll see just how fast they're pushed off the ground. Keep in mind that if the actor is being pushed toward the ground, an increase in force will not be as obvious.

Cipscis



I agree, after a lot more testing, having applied this to a super sledge, I noticed that the angle of attack makes a HUGE difference. If in VATS, the first hit does a knockback, even a small amount, enough to lift them just a little... if the second hit hits them in the air, they go FLYING even with a PushActorAway of 50... it's just a shame that most of the swings are from overhead and down onto the enemy... though I guess that makes it a bit more special when you get a properly timed grand slam.
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Mon May 16, 2011 11:59 pm

You could maybe create an invisible dummy actor, and use moveto or setpos to keep it positioned just below whoever's holding the weapon. If the push originated from that actor, it should push the target up into the air most of the time. Or you could relocate it to just under whoever gets hit by the weapon (that would actually be easier to implement, given the way that weapon enchantments work) and they'd just pop directly up into the air.
User avatar
loste juliana
 
Posts: 3417
Joined: Sun Mar 18, 2007 7:37 pm

Post » Tue May 17, 2011 4:27 am

this is a solution I came up with, after a lot of testing... maybe someone else has a better way to pull off a quicker timer, but this is very effective... very funny to put into a baseball bat

ScriptName GrandSlamWeaponEffectref mySelfshort Timershort DoOnceBEGIN ScriptEffectStart		set mySelf to getSelf		myself.pushActorAway myself 5		set Timer to 5		set DoOnce to 1endbegin GameMode	if DoOnce == 1		if Timer > 0			set Timer to Timer - 1		else			set DoOnce to 0			player.pushActorAway mySelf 20		endif	endifend

the first 5 in there likely doesn't need to be adjusted at all. The later "player.pushActorAway mySelf 20" can be changed depending on desired effect. 20 is enough for a pretty massive and unrealistic toss... 30-40 may toss them up to a cell away... 50 and over, and removing the DoOnce check seems to occasionally cause a CTD, likely because of the actor going more cells away than are being processed.
User avatar
Alexis Acevedo
 
Posts: 3330
Joined: Sat Oct 27, 2007 8:58 pm

Post » Tue May 17, 2011 1:52 am

Just a couple of notes on that script.

First, because you're doing this in an effect script, you should use a http://geck.gamesas.com/index.php/ScriptEffectUpdate block instead of a http://geck.gamesas.com/index.php/GameMode block. You might even want to try using a http://geck.gamesas.com/index.php/ScriptEffectFinish block instead, using the effect's duration as a timer instead of using a scripted timer.

Second, when calling http://geck.gamesas.com/index.php/PushActorAway on the reference that the script is running on, you should use implicit reference syntax instead:
PushActorAway mySelf 5 ;<- Implicit Reference SyntaxmySelf.PushActorAway mySelf 5 ;<- Explicit Reference Syntax
http://geck.gamesas.com/index.php/GetSelf should only be used when passing the information to another script or, as you've done, when using the information as a parameter of another function.

Cipscis

EDIT:

@Imp of the Perverse:
If you call http://geck.gamesas.com/index.php/PushActorAway on the same reference as the "target", the actor will be pushed directly up (f a negative force is used, they'll be pushed down instead).

Cipscis
User avatar
Chris Ellis
 
Posts: 3447
Joined: Thu Jul 26, 2007 10:00 am

Post » Tue May 17, 2011 4:11 am

the reason I did a GameMode block is for the timer like effect. if the followup push away, after the push up occurs too quickly (as in instantly), it tends to negate the push up, then ends up just doing the normal thing, which is 9 times out of 10 just knocking them back to the ground, no "toss" effect.
User avatar
Grace Francis
 
Posts: 3431
Joined: Wed Jul 19, 2006 2:51 pm

Post » Tue May 17, 2011 3:04 pm


If you call http://geck.gamesas.com/index.php/PushActorAway on the same reference as the "target", the actor will be pushed directly up (f a negative force is used, they'll be pushed down instead).

Cipscis


Yeah, I got that from your earlier post, but was sort of locked into a certain way of thinking about it because of the way I was implementing my AOE stunner. I'm using an explosion to apply the knockback effect, but had to figure out some way to exclude the user. It meant keeping track of who fired the most recent explosion, and passing the reference to the effect script, which is something you'd end up needing to do if you wanted to implement my (more convoluted) solution. Unfortunately there's no way to tell when a real weapon has just been fired, so there's probably no way to do it (my "weapon" is entirely scripted, and fired via hotkey).

I think using scripteffectfinish sounds pretty elegant, but I'm pretty sure the minimum duration for an effect is 1 second, which might be too long for this application.
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Tue May 17, 2011 1:10 pm

I think using scripteffectfinish sounds pretty elegant, but I'm pretty sure the minimum duration for an effect is 1 second, which might be too long for this application.


with the way I went about doing this, anything under maybe .1 - .2 seconds was too short (causing the target to just get pushed against the ground the majority of the time) and anything longer than maybe .4 - .5 had to noticable a pop-up, before pushed, so didn't look very natural

edit:

after some playing, a more streamlined version, works beautifully, adjust the part in the ScriptEffectFinish to define the toss distance

ScriptName GrandSlamEffectScriptref mySelfBEGIN ScriptEffectStart		set mySelf to getSelf		pushActorAway myself 2endBegin ScriptEffectFinish			player.pushActorAway mySelf 15end

User avatar
Mashystar
 
Posts: 3460
Joined: Mon Jul 16, 2007 6:35 am


Return to Fallout 3