Jump to content

adding velocity to a hit enemy


Recommended Posts

@Volgera,

target.Physics:SetMotorVelOverride(20,0,0) target:DoTaskInTime(5,function(target)target.Physics:ClearMotorVelOverride() end)
well, this works to push stuff around unless its trying to move by itself, so u probably have to do something, to prevent it from moving by itself(probably something in the locomotorcomponent, i tried a few things but didnt find anything that works). But shooting off birds in a direction works pretty good with it so far(i bound it to a hotkey to target the thing under my mouse)^^
Link to comment
Share on other sites

I'm just not sure how the locomotor works exactly... does anyone know how I can make an enemy stop moving on hit ?

 

You can stop their brain to prevent new paths from being taken. I don't know how to clear the cache though...

Link to comment
Share on other sites

teleporting wouldn't give the 'fun' of hitting them with a baseball bat and seeing them get smashed away :p

 

I've also noticed this 'pushing away' effect hasn't at all been used by klei in the game... even the exploding gundpowder doesn't have a blast radius or sth

Link to comment
Share on other sites

I've also noticed this 'pushing away' effect hasn't at all been used by klei in the game... even the exploding gundpowder doesn't have a blast radius or sth

then use a better searchfunction, it's used a lot :razz:

i would suggest the "search in files" function in notepad++ with the filter *.lua and the data-folder of the game.

iam not sure how gunpowder pushes stuff, but i think it's this:

inst.Transform:SetFromProxy(proxy.GUID)
u could also try around with the collisionphysics and have stuff "collide" away from your character by making his collisionphysics bigger (just search for physic with notepad++).
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...