[1.1.33] lua: unexpected projectile target miss at slow speeds
Posted: Wed May 05, 2021 9:11 pm
TL;DR: with surf.create_entity(projectile, target = playerpos.y +2, speed=0.1) cannon ball kills you instead :> (not exactly, just flies higher than the target).
expect: hit that pole
what you get: you get killed.
/c
Can I even see it hit the pole? Set speed to 0.15 or higher, way waster than I want this one but should work for offset 2,2
Nota Bene: the offset it flies at behaves strangely to me so no luck with a *goalpost shift* function so far neither.
What works? The bullet. It's charming.
What does not? The targeting via set target at slow speeds.
May possibly be related to how spitters target the fast train in parallel, let's hope it is not...
Why do I want this? A bullet hell with a slow-mo mode awaits a new random encounter. The best idea rn is to set both game speed and player speed higher, looksbadman.
Best regards,
and good luck!
expect: hit that pole
what you get: you get killed.
/c
Code: Select all
local ce = game.surfaces[1].create_entity; local ppos = game.player.position; local t = ce({name = "small-electric-pole", position = {x= ppos.x + 2, y = ppos.y + 2}});ce({name = "cannon-projectile", position = {x= ppos.x + 64, y = ppos.y}, target = t, speed = 0.12, max_range = 3200})
Nota Bene: the offset it flies at behaves strangely to me so no luck with a *goalpost shift* function so far neither.
What works? The bullet. It's charming.
What does not? The targeting via set target at slow speeds.
May possibly be related to how spitters target the fast train in parallel, let's hope it is not...
Why do I want this? A bullet hell with a slow-mo mode awaits a new random encounter. The best idea rn is to set both game speed and player speed higher, looksbadman.
Best regards,
and good luck!