Page 1 of 1
Push player by lua
Posted: Sat Dec 07, 2019 7:13 am
by Donhomerj
Hi Guys,
is it possible to push an object by a lua script?
Like something happens, and the game spawn a small explosion or something on the objects location and pushes it?
Re: Push player by lua
Posted: Sat Dec 07, 2019 8:12 am
by Marth8880
You could spawn an invisible auto-firing turret that fires an emitterordnance with a push value. I did something similar to implement incendiary ammo here:
https://github.com/marth8880/MEUScripts ... ce.lua#L87
Worth noting that the turret should have a very short LifeTime. Mine uses a value of 0.02 seconds, which gives it enough time to fire once and self-destruct.
Re: Push player by lua
Posted: Sat Dec 07, 2019 2:16 pm
by AnthonyBF2
You could also put together some sort of destructible entity, then use IsVisible and IsCollidable to make it invisible and hollow, then use KillObject to trigger it's death near the player which would have an explosion attached.
Re: Push player by lua
Posted: Wed Dec 25, 2019 9:27 am
by Donhomerj
Complicated but logic solution. I am not sure however if that will work in multiplayer.
But thanks for the ideas!