Knockback.
Moderator: Moderators
Knockback.
I am unfamilar with the lua move control.. What I want to do is have a large explosion, throw the units around it in a radius away from it. Also I want to trigger an animation when the get knocked back and land to make it look convincing. I also want to allow units to be knocked down and get back up.
How can I get started on this?
How can I get started on this?
Re: Knockback.
but i was never gone?
Spring.AddUnitImpulse, Spring.SetUnitPhysics, looking at gadgets that use movectrl (jumpjets, CT's falling rocks), rotate base piece of units while wiggling the arms so it looks like it has fallen over, set their speed to zero while they recover.
Spring.GetUnitsInSphere (center of explosion)
Spring.MoveCtrl.Enable(unitID)
Spring.MoveCtrl.SetPosition (unitID, x, y, z)
Spring.AddUnitImpulse, Spring.SetUnitPhysics, looking at gadgets that use movectrl (jumpjets, CT's falling rocks), rotate base piece of units while wiggling the arms so it looks like it has fallen over, set their speed to zero while they recover.
Spring.GetUnitsInSphere (center of explosion)
Spring.MoveCtrl.Enable(unitID)
Spring.MoveCtrl.SetPosition (unitID, x, y, z)
Re: Knockback.
Spring.AddUnitImpulse
I would try this but spring units bounce around like fucking rubber balls(frustrating as hell!)
Spring.AddUnitImpulse
so I just translate the unit?
I would try this but spring units bounce around like fucking rubber balls(frustrating as hell!)
Spring.AddUnitImpulse
so I just translate the unit?
Re: Knockback.
Good luck, doing it right won't be an easy task.
Re: Knockback.
yeah, well someone has to, I am tried of watching units amble around while taking hits from 360mm rockets.
Re: Knockback.
doing it wrong is enough for 99%Good luck, doing it right won't be an easy task.
Though last person to try was emmanuel and he got banned

Re: Knockback.
emanuel was unbanned and came back a much better behaved person. I don't know if he is banned again though.
Re: Knockback.
Just use weapon impulse with sensible values, and HitByWeapon callin in cob/LUS for the animation.
Re: Knockback.
You could animate it hard, by adding a empty piece as parent, rotating the whole unit while sending it "flying".. but thats very hackish... will look shitty if terrain is rough (unit sinking into the floor)
You could make the unit a projectile and recreate it upon landing... that way you have full controll on the ballistic curve and everything.. including nice dust-sfx when landing..
You could make the unit a projectile and recreate it upon landing... that way you have full controll on the ballistic curve and everything.. including nice dust-sfx when landing..
Re: Knockback.
And the units bounce when they land.. like a fucking rubber ball.FLOZi wrote:Just use weapon impulse with sensible values,
I didn't say they would be knocked back by a weapon, what if I want to have a unit be thrown by another. The gouf custom can lift a section of concrete bridge...FLOZi wrote:and HitByWeapon callin in cob/LUS for the animation.
no animation...PicassoCT wrote:You could make the unit a projectile and recreate it upon landing... that way you have full controll on the ballistic curve and everything.. including nice dust-sfx when landing..
Re: Knockback.
you said "large explosion, throw the units around it in a radius away from it."smoth wrote:I didn't say they would be knocked back by a weapon, what if I want to have a unit be thrown by another.
Maybe decide what you want or start something and then ask for help on details, no use in guessing or spamming ideas.
Re: Knockback.
would be cinematic in nature.. as in a guy roaring or a building blowing up.. not a weapon persay..
Re: Knockback.
You could call it via a gadget if you wanted to, in addition to any particular weapons triggering any particular animations in it.
Tweaking mass vs impulse should minimise rubber-ballery?
Tweaking mass vs impulse should minimise rubber-ballery?
Re: Knockback.
I have given them masses >1mil and bounce was not effected. Unless you know something I don't nope they bounce all the same 

Re: Knockback.
You could look for hitting-the-ground damage in :PreDamaged, and if it was high enough (Indicating its going to have a noticible bounce) you could destroy it instead, or maybe use MoveCtrl to stop/slow it.