• Welcome to Freedom Reborn Archive.
 

Would it be Possible to Simulate KB from Thrown Objects This Way?

Started by TaskMasterX, March 28, 2007, 07:08:34 AM

Previous topic - Next topic

TaskMasterX

I got to thinking about how to simulate KB from thown objects and with the Flying Melee method still fresh in my mind, I came up with an idea that might work. Would it be possible to somehow detect when a character is throwing something (maybe M25's Throwing Subtype could be used)
def ST_throwing(char,target=None,param=None,param2=None):
return GetObjectVar(char,'throwstate',default=0,integer=1)>0

and when the character is throwing something, trigger a Projectile/Beam Power from the character with no damage or FX, only KB. This way the projectile/beam will (hopefully) follow the path of the thrown object and hit the character, knocking them to the ground. The only problems I see so far are the timing of the impacts and possibly the projectile/beam hitting or missing while the thrown object does just the opposite.

M25

That would only work for characters running a custom AI, and like you said, throwing misses a lot, so the knockback should only be triggered after a character takes damage.

Is there anything in ff.log that indicates when a character is hit by an object?

Blitzgott

Man, I still don't undestand why the hell Irrational removed KB inflicted by thrown objects...

TaskMasterX

Quote from: Blitzgott on March 28, 2007, 08:00:34 AM
Man, I still don't undestand why the hell Irrational removed KB inflicted by thrown objects...
I consider this one of the stupid mistakes that IG made w/ this game, probably due to rushing out the product w/out the proper amount of testing. Along w/ the game taking longer to load the more hero files you have, an issue in  :ff: that was fixed w/ the 1.2 patch, but now we see that same problem again in  :ffvstr:  :doh: and the Melee Area Range problem, thankfully fixed by Stumpy were among the top 3 dumb things that shouldn't have happened w/ this game. :thumbdown: The better graphics, FFX and M25's AI are pretty much why I still play this game rather than :ff:.

Quote from: M25 on March 28, 2007, 07:45:47 AM
That would only work for characters running a custom AI, and like you said, throwing misses a lot, so the knockback should only be triggered after a character takes damage.

Is there anything in ff.log that indicates when a character is hit by an object?

Yes, it looks like it. Here's a clip of the FF.log:
00:09:53.69: FF: animator:(hero_0) Ignoring sequence request, already animating looping hover
00:09:53.87: FF: activation: Making object _impobj_155 STATIC
00:09:53.87: FF: activation: De-Activating object _impobj_155
00:09:54.24: FF: animator:(custom_vil_0_1) setSequence stand_with_object
00:09:54.24: FF: animator:(custom_vil_0_1) setSequence2
00:09:54.24: FF: animator:(custom_vil_0_1) disableCurrentState
00:09:54.24: FF: animator:(custom_vil_0_1) CAnimator::stopAnimating: Deactivate Sequence pick_up_object
00:09:54.24: FF: animator:(custom_vil_0_1) Calling LayerDeactivate for pick_up_object
00:09:54.24: FF: animator:(custom_vil_0_1) end disableCurrentState
00:09:54.24: FF: animator:(custom_vil_0_1) end setSequence2
00:09:54.24: FF: animator:(custom_vil_0_1) end setSequence stand_with_object
00:09:54.24: FF: animator:(custom_vil_0_1) startSequenceSwap
00:09:54.24: FF: animator:(custom_vil_0_1) BlendActivate pick_up_object -> stand_with_object
00:09:54.24: FF: animator:(custom_vil_0_1) end startSequenceSwap 0.500000
00:09:54.49: FF: animator:(custom_vil_0_1) setSequence throw_object
00:09:54.49: FF: animator:(custom_vil_0_1) setSequence2
00:09:54.49: FF: animator:(custom_vil_0_1) disableCurrentState
00:09:54.49: FF: animator:(custom_vil_0_1) stopSequenceSwap
00:09:54.49: FF: animator:(custom_vil_0_1) BlendDeactivate pick_up_object -> stand_with_object
00:09:54.49: FF: animator:(custom_vil_0_1) end stopSequenceSwap
00:09:54.49: FF: animator:(custom_vil_0_1) end disableCurrentState
00:09:54.49: FF: animator:(custom_vil_0_1) end setSequence2
00:09:54.49: FF: animator:(custom_vil_0_1) end setSequence throw_object
00:09:54.50: FF: animator:(custom_vil_0_1) startSequenceSwap
00:09:54.50: FF: animator:(custom_vil_0_1) BlendActivate stand_with_object -> throw_object
00:09:54.50: FF: animator:(custom_vil_0_1) end startSequenceSwap 0.100000
00:09:54.61: FF: animator:(custom_vil_0_1) startAnimating throw_object
00:09:54.61: FF: animator:(custom_vil_0_1) end startAnimating throw_object
00:09:56.20: FF: Damage:(_impobj_154)  (applied) dmg: 17, stun time: 0
00:09:56.20: FF: Damage:(hero_0)  (applied) dmg: 35, stun time: 0
00:09:56.20: FF: animator:(hero_0) blendFrame pain
00:09:56.20: FF: animator:(hero_0) CAnimator::blendFrame: DeactivateAll
00:09:56.20: FF: animator:(hero_0) end blendFrame pain
00:09:56.29: FF: animator:(hero_0) startBlend
00:09:56.29: FF: animator:(hero_0) Blend hover -> pain
00:09:56.29: FF: animator:(hero_0) end startBlend
00:09:56.80: FF: animator:(hero_0) stopBlend
00:09:56.80: FF: animator:(hero_0) CAnimator::stopBlend: DeactivateAll
00:09:56.80: FF: animator:(hero_0) end stopBlend
00:09:57.60: FF: animator:(hero_0) stopBlend
00:09:57.60: FF: animator:(hero_0) CAnimator::stopBlend: DeactivateAll
00:09:57.60: FF: animator:(hero_0) end stopBlend
00:09:57.60: FF: animator:(hero_0) CAnimator::resumeAnimating: Activate Sequence hover
00:09:57.60: FF: animator:(hero_0) resumeAnimating Calling ActivateSequence for hover
00:09:57.70: FF: animator:(custom_vil_0_1) setSequence melee_idle
00:09:57.70: FF: animator:(custom_vil_0_1) setSequence2
00:09:57.70: FF: animator:(custom_vil_0_1) disableCurrentState
00:09:57.70: FF: animator:(custom_vil_0_1) CAnimator::stopAnimating: Deactivate Sequence throw_object
00:09:57.70: FF: animator:(custom_vil_0_1) Calling LayerDeactivate for throw_object
00:09:57.70: FF: animator:(custom_vil_0_1) end disableCurrentState
00:09:57.70: FF: animator:(custom_vil_0_1) end setSequence2
00:09:57.70: FF: animator:(custom_vil_0_1) end setSequence melee_idle
00:09:57.70: FF: animator:(custom_vil_0_1) startSequenceSwap
00:09:57.70: FF: animator:(custom_vil_0_1) BlendActivate throw_object -> melee_idle
00:09:57.70: FF: animator:(custom_vil_0_1) end startSequenceSwap 0.500000
00:09:57.71: FF: animator:(custom_vil_0_1) setSequence run
00:09:57.71: FF: animator:(custom_vil_0_1) setSequence2
00:09:57.71: FF: animator:(custom_vil_0_1) disableCurrentState
00:09:57.71: FF: animator:(custom_vil_0_1) stopSequenceSwap
00:09:57.71: FF: animator:(custom_vil_0_1) BlendDeactivate throw_object -> melee_idle
00:09:57.71: FF: animator:(custom_vil_0_1) end stopSequenceSwap
00:09:57.71: FF: animator:(custom_vil_0_1) end disableCurrentState
00:09:57.71: FF: animator:(custom_vil_0_1) end setSequence2
00:09:57.71: FF: animator:(custom_vil_0_1) end setSequence run
00:09:57.71: FF: animator:(custom_vil_0_1) startSequenceSwap
00:09:57.71: FF: animator:(custom_vil_0_1) BlendActivate melee_idle -> run
00:09:57.71: FF: animator:(custom_vil_0_1) end startSequenceSwap 0.100000
00:09:58.11: FF: animator:(custom_vil_0_1) startAnimating run
00:09:58.11: FF: animator:(custom_vil_0_1) end startAnimating run


Maybe the animations, stand_with_object and throw_object could be detected and let that be the trigger for triggering the range power?
I was thinking a bit further and realized that this would need to be somehow applied to TK and SuperTK, which may use different animations. Sigh! :(

catwhowalksbyhimself

Actually, from glancing through the logs, the damage being triggered to both an object and a character at about the same time might be the trigger you'd need.

Although you'd still need some other information.

Epimethee

QuoteActually, from glancing through the logs, the damage being triggered to both an object and a character at about the same time might be the trigger you'd need.

Although you'd still need some other information.
Maybe creating an MLOG registration function checking for activation of existing static objects (here, activation means the static object is moving) would do the trick, when coupled with ulterior use of RegDamage() or regMLOGDamage().

stumpy

Possible, but it would best be done as a non-object-specific sink call (maybe under the HandleActivationSpawnCallbacks() scheme). It would be an overhead nightmare to register each object individually.

Seems like we might be able to do a regPickup() on throwable objects then check the log for simultaneous damage to that object and whatever it hit...