Page 1 of 1

Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 5:10 pm
by Mooncat
Request: please make the new "push-back" effect to accept distances lower than 0.3, and lower its actual effective distance from 1 to the input value.

During my approach to make a proper push back effect for the discharge defense equipment by dividing the effect into multiple frames, I found out that the new "push-back" effect does not accept values lower than 0.3. No error was thrown, but it didn't do anything. Even if I input 0.3, the actual push back distance seems to be 1.

If this request is implemented, I can make a proper push back effect. :) (I would call the current effect as teleportation.)

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 5:13 pm
by Ranakastrasz
Absolutely do need this. Allowing sliding effects would be great.

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 5:26 pm
by Rseding91
The distance isn't limited to any particular value code wise. It does however not work if you try to move the entity by less than half its bounding box size because it can't find a place that doesn't collide with itself and can't move the entity.

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 5:30 pm
by Ranakastrasz
Ah. In that case, when a push effect occurs, ignore the entities own bounding box for checking.

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 5:36 pm
by Mooncat
Rseding91 wrote:The distance isn't limited to any particular value code wise. It does however not work if you try to move the entity by less than half its bounding box size because it can't find a place that doesn't collide with itself and can't move the entity.
I think it can (partially) explain why this thing occurs:

All targets are pushed to the same direction when I set distance = 0. Looks like a bug.

Yes, as Ranakastrasz said, each target should ignore itself when being pushed. :)

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 5:52 pm
by Ranakastrasz
Huh. If the distance was zero, I would expect it to go due east, due to the whole Atan2 thinggy. Always happened when I messed with Angles.

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 6:08 pm
by Mooncat
You can't expect how the aliens behave. :P
Yea, I tried a few more times. The direction is the same.

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 6:10 pm
by posila
Hack tip ... you can teleport biters back and give them sticker with negative movement modifier. So when they try to run back toward you, they will actually move backwards :D

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 6:52 pm
by Mooncat
posila wrote:Hack tip ... you can teleport biters back and give them sticker with negative movement modifier. So when they try to run back toward you, they will actually move backwards :D
lol! Didn't think of it.
But I think it is not very effective on spitters? Since they don't need to move before spitting on you. :lol:

Re: Lower the minimum distance of push-back effect?

Posted: Thu May 04, 2017 7:55 pm
by Ranakastrasz
Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?

Re: Lower the minimum distance of push-back effect?

Posted: Fri May 05, 2017 1:56 am
by Mooncat
Ranakastrasz wrote:Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
Based on my Supportive Weapons mod (pending update for 0.15), 2 different stickers with slow down effect can definitely make the enemies move slower than just one sticker. I think they multiply. Addition will easily produce negative movement speed, but I didn't see that happen in my mod.

Re: Lower the minimum distance of push-back effect?

Posted: Fri May 05, 2017 12:38 pm
by Ranakastrasz
Mooncat wrote:
Ranakastrasz wrote:Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
Based on my Supportive Weapons mod (pending update for 0.15), 2 different stickers with slow down effect can definitely make the enemies move slower than just one sticker. I think they multiply. Addition will easily produce negative movement speed, but I didn't see that happen in my mod.
Thing is, addition for modules could easily result in negative energy consumption if you stack 3 50% effectively modules. Instead, it caps at 20%. Just beccause it uses addition doesn't preclude a cap.

Re: Lower the minimum distance of push-back effect?

Posted: Fri May 05, 2017 1:25 pm
by Mooncat
Ranakastrasz wrote:
Mooncat wrote:
Ranakastrasz wrote:Do those speed modification debuffs stack? If so, do they add or multiply? can you end up with negative speed if they add?
Based on my Supportive Weapons mod (pending update for 0.15), 2 different stickers with slow down effect can definitely make the enemies move slower than just one sticker. I think they multiply. Addition will easily produce negative movement speed, but I didn't see that happen in my mod.
Thing is, addition for modules could easily result in negative energy consumption if you stack 3 50% effectively modules. Instead, it caps at 20%. Just beccause it uses addition doesn't preclude a cap.
But posila said that there is no cap on movement speed effect from stickers.
Anyway, I did a small test: I changed the "target_movement_modifier" of "slowdown-sticker" to 2, and that of "stun-sticker" to -0.2

I bet the equation is something like

Code: Select all

local final_velocity = base_speed
for _, sticker in pairs(stickers) do
    final_velocity = final_velocity * sticker.target_movement_modifier
end
return final_velocity

Re: Lower the minimum distance of push-back effect?

Posted: Fri May 05, 2017 1:30 pm
by Ranakastrasz
Ok, test this.
2x speed tag.
-1x tag
See if they move at double speed, normal speed backwards, and double speed backwarda

Re: Lower the minimum distance of push-back effect?

Posted: Fri May 05, 2017 6:23 pm
by Mooncat
Ranakastrasz wrote:Ok, test this.
2x speed tag.
-1x tag
See if they move at double speed, normal speed backwards, and double speed backwarda
Actually you can test it yourself. :P
Image