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?
Push player by lua
Moderator: Moderators
-
- Recruit Womprat Killer
- Posts: 12
- Joined: Sun Feb 17, 2019 5:55 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Push player by lua
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.
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.
- AnthonyBF2
- Sith
- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Push player by lua
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.
-
- Recruit Womprat Killer
- Posts: 12
- Joined: Sun Feb 17, 2019 5:55 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Push player by lua
Complicated but logic solution. I am not sure however if that will work in multiplayer.
But thanks for the ideas!
But thanks for the ideas!